I amhaving similar problems with my 2005 FX4, it would not go into 4Hi or Lo, I keep trying every now and then, and one day it does go into 4WH, GREAT!!!!!! now it won't come out of 4WH, so I try putting it into 4WL, it goes in, and now won't come out of LOW. I replaced the shift motor last summer when this happened, and it fixed it for a few days, then stopped going into 4WD, I don't think its the IWE's cause it wouldn't go into 4WD and drove in 2WD no problem, until the ESOF finally did send a signal to the shift motor to change to 4WD.
I think my shift motor is not getting the signal to change. I have also replaced the vacuum solenoid, so that rules that out. My mechanic did say I had no power going tot he shift motor at one point when he was working on it, but then power came back.
2005 F150 FX4 Supercrew 5.4L