Welcome to the forum.
Are you sure its the starter motor and not just the usual problem "Startus Interruptus" (bad wiring).
An easy way to check the starter and battery is to take a wire and connect it to the spade terminal of the starter solenoid.
Make sure the bike is in neutral, pull the clutch in to be sure, don't turn the key on (unless you want it to start).
Touch the other end of wire to battery positive terminal or the hot terminal of the solenoid, this bypasses all the interlocks and bike wiring.
If it cranks the engine its not the starter, if it doesn't crank but makes a loud click it could be the battery or a bad ground.
Remove the battery terminals and scrape the battery posts to expose shiny lead, apply some grease and put the terminals back.
When working on battery terminals for safety remove the negative first and it's the last one to go back on, hard to accidentally short out that way.