My 04' had the same problem. The IWE's are bad. I guess it is a know problem. When I brought mine in they switched them out with an updated part. If you do a search you will see a lot of threads on this topic.
the front hubs fail engaged. so if it was an IWE problem, you would be in 4x4
check your fuses. I'm betting the relay that tells the IWE to break vacuum isn't working. You can also try taking the vacuum lines loose at the IWE themselves. if the hubs engage and 4x4 works, you know it's an electrical issue somewhere...most likely at the t-case