The electrical diagram is
here. That drawing is in the "How To Tech" section of this site. Now, to test the switch... pull the switch out of the dash so you can access the wires on the back. With the key in the run position, you should see 12volts on the Red/yellow wire and also on the white/light blue wire. The red/yellow wire is power being supplied to the switch. The white/light blue wire is telling the controller that the switch is in the 2wd position.
Next, turn the switch to the 4-hi position. You should now see 12 volts on the red/yellow wire, the grey wire and the dark blue wire. You should also see some kind of 4wd indicator lighted in your instrument cluster.
Next, turn the switch to 4-lo. You should now see 12 volts on the red/yellow wire, the brown/white wire and the Orange/light blue wire. You should also see the 4-lo indicator lighted in the instrument cluster.
If all that tests right, then your selector switch is working right.
I hope that helps. I have the newer push-button controls so I can't do the tests and post pictures for you. As far as acquiring a new switch, I, personally, would try the junk yard and take a meter with me to make sure the contacts are working in the new switch before paying for it.