why is my 4-whhel drive not working correctly? on 2005 Ford F-150

2-wheel works fine but when i put it in 4-high or 4-low its like the truck is in neutral. At first i thought my trani went but it shifts fine when in 2-wheel drive. This only happens sometimes and i have no clue what the problem is

Get Your Car Fixed at a RepairPal Certified Shop.
We certify shops based on expertise, quality work, and verified customer reviews
2 answers
you could have a bad solenoid or something wrong with the the tranfer case,scan test it for codes
scan codes and post so we can adv. poss shift solenoid