I have a 2004 Jeep Grand Cherokee with about 105,000 miles. The transmission (or transfer case) recently started to make a clicking sound. It usually happens in 2 wheel drive mode and gets louder as the car warms up. the clicking sound occurs in all gears except park. It also gets faster with car speed. If the car is put into 4 wheel (full time) mode the sound seems to go away or is not as audible. When you shift back in 2 wheel drive mode the clicking sound comes back.
You should have someone operate the vehicle on a lift and check if the noise is coming from the transfer case. When the transfer case chain is worn (stretched) it can slap the case during operation. Below is a drawing of the chain and gears.