does yours have the push button or does it have the shifter in the floor?
check the vacuum lines on the transfer case,make sure they are connected.
first,you need to check the vacuum actuator that is under the battery..start the truck and put it in 4wd,remove the vacuum line from the actuator,,you should have a vacuum on the line,if you do,the problem may be the actuator[the diaphragm will bust in these sometimes],,if you don't have a vacuum,the problem may be the vacuum switch on top of the transfer case[it has 3 vacuum lines to it]these will go bad from time to time
please ACCEPT my answer so I can get credit for my work.i don't receive commission unless you do ..I'm not always going to be giving you good news,so please don't let this stand in the way of you accepting my answer.it does not cost you more money.we will still be able to communicate.. Bonuses and positive feedback are appreciated!if you are not satisfied with my answer,please do not leave bad feed back,i will gladly opt out and let another expert handle the question.PLEASE ASK IF YOU NEED MORE HELP