This was happening to me with one extra bonus... mine would do the clunk, and then would be stuck in 2WD. I would have to pull the shifter out, re-align the forks, then reassemble it - only to have it happen again next time I shifted to 4H. It didn't happen to me if I was in 4L, but 4L is too slow for the street. Anyway, when I checked the fluid level it was bone dry! I filled it up and tested it... it stayed in 4H like it should have. Hopefully yours is as simple as that!
In case you're wondering on the fluid to use, I used Mobil 1 Synthetic Gear Lubricant LS 75W-90. It's available at any auto parts store for a little over $10. You'll only need one bottle since the TC only takes 0.85 qt and the bottle is 1 qt.
To fill it, there are two large bolts on the transfer case, one at the very bottom to drain it and one about half way up to fill it. It's a bit unsophisticated, but to fill it you remove the higher bolt and simply fill it from there with a tube until it pours out from the hole. If you're doing all that, I think you should drain it first and fill it with all fresh oil. That will also give you the opportunity to check the fluid that you've drained out for pieces of metal (gear teeth). If you see that, then a rebuild or swap is in your future. Thankfully, you can get a whole freshly rebuilt TC for about $300 and the swap process is a few hours for a rookie like me.