smoke test it. 99.9 % of the time the vac harness going to the hubs is compromised, and from that point the ensuing dirt and crap being sucked into the lines does a number on the solenoid.
IWE actuators are also very, very common.
remember that these things are opposite the super doodies. vacuum is constant on the hubs of the 1/2 tons, 'sucking' on the actuators to keep them away from the hub for 2wd operation. if your smoke test comes back aces then check for vac at the end of the harness nearest each hub. @ idle you want a nice steady vacuum in 2wd, and that should disappear for 4x. (best to do this test with the front end on stands in the air .... you can turn the wheels to see the hubs engaging and disengaging the cv axles)
if you have steady vacuum (ie steady 2wd) after all this then yes, do check the solenoid both electrically and mechanically.
we stock the solenoids at the dealership. i do change them from time to time, but they are far from the normal fix on these trucks. good luck!
2003 GMC Sierra 3500 -- dually, 4x4, hasn't blown up yet and that's what i look for in a truck
Ford Doctor -- They come in broken and leave fixed. Ford of Canada Master Tech