To add to Joe's post..
Next time it will not crank, move the lever to "N". From N you can move the shift lever foward/rearward while holding key. This helps if shifter bushes are worn. [ can't do this in P cuz you are at the end of travel.]
The contacts in the Selector sw are the same for N and P, but the activating cam is different..so if you get stuck with a no start, this is good info to know... just get it fixed soon as after the N goes , its Ramp Truck City..
Usually, if P is out but N works, it cvan be adjusted [ rotation of the switch.] If that does not get you there, you need a new switch..
They are common failure due to there location makes them suseptical to water/moisture.