SAFETY !!! test the shift at the motor, unhook the connector for the shift at the motor, maybe remove the prop, start the motor, then shift by hand, SAFETY stay away from the prop.
Shift into gear quickly, sloowly will make it grind.
IF? it still grinds? then the linkage needs adjusting.
Shifter: are the shift arms loose or wobble? Does the handle move side to side or back and forth with very little pressure?
Cables, unhook and lay straight, then pull and push, it should move with very little resistance. Bad cable can make it shift hard and make it grind.