To test the vaccum system, get a good vacuum pump with a guage on it, about $60 (or cheaper) at alot of parts stores.
-If when you try to shift into 4WD and it will not engage, most likely your solenoid is not working and releasing the vacuum to the actuators and engaging the hubs. Replace the solenoid. This might happen because of the early design of the IWE solenoid with lets water run off the cowl right down on top of the solenoid possible shorting it out. The new style solenoids have a rain cover on them to prevent this. This is all being said as long as you know your shift motor on the side of the tranfer case is working properly.
-If your in 4WD and it will not shift out, the solenoid is not opening back up to let vacuum release the actuators. Replace the solenoid. Again if the shift motor is working.
-If you hear a grinding or whining of gears at certain speeds or loads you probably have leak in your vacuum system somewhere and your vaccum is dropping to or below the 5 lbs of vacuum needed to keep the actuators unlocked. Check the following:
One wheel at a time unplug the double vacuum hoses from the actuators at the wheel located behind the steering knuckle. Put your vacuum pump on the big hose fitting and pump up the pump. If it is woking correctly you will be able to build up vacuum and it will hold. A vacuum loss of 1 lb over 1 minute is acceptable. If you can not build vacuum or is leaks down very fast, the seals on the actuator are shot and the actuator needs to be replaced.
Next check your lines from the solenoid to the actuators at the wheel. Pull the double vacuum line off the solenoid. Pull the double vacuum line off of both actuators at the wheels. Plug the hoses at the wheels. (you only need to plug the big hose a the wheel, and make sure you have a good plug that seals 100%) At the double hose that you took off the solenoid, trace the lines, you want the line that goes down to the wheels, not the one that goes to the intake. Take your pump and connect it to the line end from the solenoid that goes to the wheels. Pump the pump up and see if the vacuum on the guage holds. If it does not and leaks down, you have a leak in your lines between the solenoid and the actuators. Check the lines very thoroghly from the solenoid to the wheels, its hard to get to some of the lines, but they all need checked, look for cracks or breaks. Replace the lines with factory ones from ford or make your own, like i did with bulk vacuum hose and some fittings. If the vacuum you create with the pump holds your lines are good, but still look them over for obvious faults.
Then you will want to check the vacuum reserve box that is mounted behind the battery on the battery tray. You will have to remove the battery and battery tray to access it. Once removed and the vacuum line disconnected from it, connect your vacuum pump to the fitting on the box and pump up the pump, if it pumps up with vacuum and holds it is ok. I fit doesnt build vacuum from the pump or leaks down, the box is leaking and needs to be replaced (ford only part).
Now plug the line you removed from the vacuum box, this line runs to the intake with a "T" in it. The line from the "T" goes to the solenoid. Plug the end that goes to the solenoid also. Unplug the same line at the check valve that is close to the intake. Connect your pump to that end of the line and pump up the pump. If it pumps up vacuum and holds, that line is ok, if it wont pump up or leaks down then there is a leak in that line, replace, fix, or make a new line.
There are two small check valves in the line coming off the intake. One close to the intake and one in the same line close to the solenoid. Pull those check valves off and check them. An easy way to check them is to blow (with your mouth, not compressed air, this will blow them out, i know) You should be able to blow through one end and not the other at all. Or you can check it with the pump. One side of the valve will say "VAC" connect your pump to that end and pump it up. It should pump and hold without any leak down. If it does not then replace it. If it holds its good. If one or both of these fail, the high constant vacuum will not be held correctly in the system and while driving, the vacuum could drop too low and try to engage the actuators.
If all of this checks out ok check the vacuum straight from the engine. From the line coming off the engine connect your pump to the line and turn on the truck. Watch what poundage of vacuum shows up on your guage (you will not have to pump it up) should be anywhere from about 17 to 22. Ive read that 20-22 is normal but mine likes to hover around 18-19 at idle. If this reading is too low you might have another vacuum leak somewhere else on the engine.