Get another truck to hook to your truck, with key on and with brakes released rock it back an/forth, listen for it to shift into N then try to start it up, all/ways be sure to have truck in N be fore you turn off eng. ?
If this has an I shift, check the pins in the shifter harness connector behind the drivers seat near the floormat/carpet. It is not a weather tight connection and is prone to corrosion from damp floor, wet gloves back there etc
Mine did it once in a while, then more often, then one day I couldn't get it to start at all. So I cut the plug right out and wired it directly. Problem solved.
Try Airing up the truck sometimes that helps also like the guy above me said check the pins behind the seat harness if all else fails jump the starter with ign on and it should start make sure wheels are choked.