Idea?
To start, try to isolate the problem to the cable or the trans. Disconnect the shift cable and manually shift the trans forward and reverse (not running). Also, use the lever to check for any resistence in the cable run. If you encounter resistence in either of these then this may be where the problem originates. If it's in the cable, it should be replaced because it will eventually snap at the most inconvient time.