See my post #7
Do you have a Factory Service Manual?
Pin 2 on the harness plug to your range switch is a MUX, which usually means that the switch/wiper is moving past/between multiple resistors. The ECM/PCM "decides" which position the switch is in based on the resulting voltage (resistance). These things are a great idea but are also notorious for failing to indicate the correct position as the contacts wear or open... Auto headlights coming on in the middle of the night comes to mind... Door chimes, backup lights... A lot of people have replaced PCM's/ECM's only to find out later that it was a switch somewhere that they missed because they were only looking for simple "open" or "closed" conditions. There is also NO dedicated ground on that harness which further complicates troubleshooting the MUX. (Note - pin 3 in the FSM is "blank w/dashes"... might be a misprint, could actually be the ground).
I just hate to see that happen to you.
If you want to try to isolate the switch itself try this:
Unplug the pigtail, turn truck ON, check for 5 volts on pin 5 at the harness/pigtail.
Turn truck OFF, TAP the wire going to pin 2 (20YL/RD)... reconnect the harness/plug.
Turn the truck ON and watch for a changing voltage at the tap when you move the shifter. Write down the voltage for each shifter position.
Turn the truck OFF and make sure you have zero volts at all positions (to protect your meter). Switch to Resistance and record for each postion.
You should see some sort of a pattern. At a minimum, you should see different indications between N, D, 2, 1... but the ECM might use the "Backup Lamp Feed" (pin 4) or the "Park/Neutral Position Switch" (pin 6) to "decide" positions to the left.
Pin 5 is the 5V supply to the MUX. Pin 1 is the fused ignition/run.
Remember that "open" or "closed", especially with a MUX, still usually correlates to a "true" condition as far as the ECM is concerned. There is a very good chance that the 5 volt feed is open or low, or that one of the resistors in the MUX is open. They (resistors) are usually in series so when "any" one of them is open (current = zero) you only get 5V on one side of the open, 0V on the other... If you move the shifter and that's all you see, the MUX is open.
I'm probably making this sound complicated but it's actually a very simple process. Good luck.