The electronic shift transfer case system was another over engineered piece that worked fine when it was new, but not so good when the wiring and everything else gets some age on it.
I had electronic shift on my 86 ranger, and with a new motor got it working for a couple of years before it quit. I messed with it for awhile, but then gave up and converted it to a manual electric shift.
What I did was run a hot fused wire directly from the battery to a double pole double throw switch. I basically wired the switch like a power window setup, with the shift motor being the same as the power window. I also got into the shift computer, found the correct wires coming from the switch on the motor, and tied them into the proper wires to the transfer case shift indicator lights.
I had to always come to a stop. I would then bump the switch till the 4x4 light came on. I was then in 4x4 hi. If I kept bumping the switch, the 4x4 low light would come on. I say bump the switch, putting a direct 12v to the shift motor makes it go very fast, they must have used a lower voltage with the computer system. 4 hi could be hard to find sometimes, too much bump and it can go past it a little bit, and then when you take off you might get a little grind noise. You then knew you had overshot and can bump it back a little bit. 4 low was always easy to get. I used it for years this way, and always had 4x4 when I needed it. The auto hubs always did their job and never gave me any trouble.