Could be the shifter solenoid. but most likely it's in the section where the shifter cable goes into. There is also 2 sensors on the top of it one forward and one reverse . I do believe that unit has a manual post coming out of the lower side of the engine on the left side when sitting on it. Put a socket on it and see if the bike will shift manually. If not then it's either the section with the 2 sensors on it or the mechanism inteernally itself.
You must be sure your alternators working. Check AC input it's the three yellow wires. Check volts between 2 wires an shoul be 35 + volts. Check between all three.