This is from another site hope it helps. Another person had the same issue and said it was the relays next to the battery.
I'm not 100% sure, but it sounds like the electric motor in the transfer case is failing to operate. It sounds like you should have relieved any bind on the drivetrain. If you take it in, the tech. will most likely look to see if the motor is getting the signal from the switch and also if the motor is trying to turn the selector cam in the transfer case. Keep in mind that the computer will be "doing its thing" for up to 20 seconds after the driver turns the ESOF selector switch. Switching to another selection before this time is up will cause confusion for the computer. Try placing the switch in 4LO and driving for a bit (make sure it's longer than 20 seconds or so). Then, while slowing down, place the tranny into neutral (while the truck is still rolling) and place your foot on the brake just enough to turn on the brake lights (but let the truck continue to roll) and after you have pressed on the brake, turn the selector knob to 4HI. I remember reading that the transfer case will try and begin operation with the vehicle moving at 3 MPH or less, as long as the other two conditions were met (tranny in neutral and service brake slightly depressed). Even in 4 HI, you could still get the truck to a dealership w/o having to tow. I hope this helps.