Its a common issue on the 4th gen. It's more than likely the main "O" ring but if you're going to replace you should probably go ahead and do your actuator shaft seals as well.
The O ring is part # 90301-56009 (some people put 2 of them in there) and the seals can be bought from Colonial seal, part # "15x23x7 AS NBR"
Link to the walk thru if you do it yourself:
Fixing the transfer case shift motor leak from within..
If you take it to the dealership be prepared for a $1500-$2000 bill. You could also just replace the whole transfer case actuator (comes with new o ring and seals) but that too will cost between $700-$1200 just for the part.