Disconnect the linkage at the transmission to make sure the shift shaft that comes out the side of the transmission will go through all the detents. Make sure the wheels are blocked so the truck can't roll. You should be able to manually rotate the shift and see if it will allow you to go through all the gears. The engine does NOT need to be running for this test.
If you can shift through all the detents with the linkage off, then you should be fine inside the transmission. If you can't, then you have a problem inside the transmission with the way the linkage is hooked up there.