Electric shift or manual shift?
Do a search through the posts in here and down in the Other Drivetrain forum. Quite a few other threads with xfercase trouble that might help ya do more troubleshooting before dropping the money on a whole transfer case.
If it's electric-shift, it might just be a bad shift motor, bad switch, or GEM module...you should be able to pull the shift motor off the back of the case and shift it manually by turning the shifter cam shaft that the motor turns.
I did a rebuilt electric-shift transfer case in my 97 this summer. $350 from the junkyard and not quite $400 worth of new parts...so I basically have a complete rebuilt transfer case for about $750. The shop that swapped my transmission (and forgot to refill the transfer case with fluid!) did the labor on it. I was there helping him out (and making sure it got filled!!!) since we did it after hours because I needed my truck ASAP.
The hardest part about changing it yourself is that you'll need to split the exhaust system to get the transfer case out of the truck. The FSM says you need to pull the torsion bar crossmember, but you can finagle the transfer case out without dropping that crossmember by doing some creative twisting.