My transfercase did that alot. the problem with mine was the tip was worn down and it would somehow pop between the shifter forks for the transfer case. the way I had to fix it was by removing the snapring holding the TC shifter inplace, pull it out, then if posible restab it.
Usually though where the forks ended up it was easier to take a long screwdriver and shift it into 4wheeldrive hi (both shifter forks in their forward positions) and then restab it like that. If you have to shift it with the screw driver make certain you shift the driver side fork foward first.
Hope this helps.