Does the ignition key turn ok?
The truck has what is called a Brake Transmission Shift Interlock(BTSI) on if. This essentially locks the shifter so you can't accidentally shift without your foot on the brake. If that solenoid on the shift cable is not loosing power when you step on the brake it won't work properly.
Remove the steering column covers to gain access to the BTSI and disconnect it from the shifter to see if you have an issue with the shift mechanism. If you can move the shift lever then that is one component that you know is good. The next thing to check is the electric solenoid on the cable. It should click when you step on the brake pedal as the solenoid is de-energized. This leaves either a brake switch or a cable problem.
You can check for power at the connector with a test lamp. It should cycle for on to off as you press the brake pedal.