Um...
The '98 to 2000 models had an electric motor to operate the transfer case, and vacuum to operate the axle hub lockouts. Each has its problems and its fixes. I'm thinking you may be confused on what your problem is and how to fix it.
The problems I've had (that sound like yours) is that one or more of the hubs would engage themselves. During startup, the computer would activate then deactivate the hubs (some kind of self check?), then one or both of the hubs would stick in the locked position. I believe this happened causing a bearing to go out, because one locked and the free wheel was "seeing" 120 MPH over an extended period of time (due to reverse rotation through the open differential). This seems to be a common problem and the only fix I found was to permanently lock the hubs or go to a manual lock/unlock system (several ways to do either).
If your transfer case is going into 4wd, then there is some problem other than/besides hubs. The only experience I had like that was when it lunched (yeah, looked like a small tactical nuclear device was inserted through the fill plug somehow). I attribute that to self-locking of the hubs and spinning the front drive shaft in a manor it was not designed for. Both of these incidences occurred while I was towing the Ranger cross country behind a large vehicle (like a motorhome) so I didn't get any clues that something was going wrong.
Maybe someone else has better info for you, but my fixes was to override control from the computer. There are several ways to do this. I cut the wires going to the transfer case motor and hooked up a toggle switch control circuit. I also put AVM manual hubs on.
Without knowing better what your problem is, I won't elaborate (further) on all this.