And even before all the stuff that Dave said, get a test light, pull the two-wire connector on the shift motor, and connect the test light to the two connections in the plug.
With the engine running (be CAREFUL under there!), have someone turn the ESOF **** to 4x4, wait 10 seconds, and go back to 4x2.
If the light doesn't light, you need to go backwards up the chain through the fuses and relays. If the light DOES light, the motor is shot.