Just to confirm, the truck was idling for all these, correct?
What's happening is that the transfer case is working just fine, but the IWEs are failing to engage. The Integrated Wheel Ends are supposed to default to the locked position with no vacuum on them, and when you turn the key on, the system is supposed to activate the IWE solenoid and apply vacuum to unlock them in 2wd.
What I suspect is happening is that the IWE solenoid is sticking and not closing for some reason, so it never cuts the power to the IWEs and, therefore, they never lock in. So, there's a couple things we can try.
First, with the front end back in the air, idling in park, remove the vacuum line from the IWE solenoid (mounted to the firewall behind the outside corner of the battery). With the vacuum line disconnected, the IWEs should lock in. When you shift to 4high, the vacuum on the output port should cease at the solenoid. If the vacuum continues, and the IWEs lock in with the vacuum line off like they should, you've got a bad IWE solenoid. Sometimes a couple of taps will break it free, but if it's stuck, odds are it's frozen.
The other possibility is that the PCM is not properly grounding the solenoid. To check that, you'll need to check for continuity to ground through the harness. If you unplug the IWE, the connector will have one hot pin and one pin that goes to ground when you shift to 4high. You'll want to verify that the PCM is grounding the solenoid properly before you spend the money on a new one.