If it was just popping previously, it's likely the transfer case chain is stretched and slipping on the sprockets. The transfer case popping out of gear is a slighlty different issue and in your case is likely due to worn internal parts. It's time for a transfer case rebuild or replacement.
There's a slight chance that adjusting the transfer case linkage will help but I doubt it.