I would say about 95% of the time it is the motor, just from what I have read here. if you do a search you will find out how to clean the shift motor.or you can do what I did and switch to a manual shift shift transfer case and manual locking hubs.
You can also buy a new shift motor, I think the ford parts network ( a sponsor of this site ) has them for $249.00 .
Joe