As it developed slowly over time, I'd suspect the cable. If it happened suddenly, I'd look at the trans itself. Those cables don't last forever, especially of you don't lube them occasionally. As was previously said, disconnect the cable from the trans and shift it by hand. If that works, try the shift lever, it should still be stiff. Then disconnect from the lever to see if it's the lever or cable. Lubing the lever mechanism might fix it, but if its the cable, and it probably is, it's likely got corrosion and broken strands and will need replacement.
Motorcycle shops sell cable lubers that work really well. Lube the new one when you put it in and then maybe yearly after that.