Welcome to the forum.
Your diagnosis sounds spot on.
A couple of things to try:
Disconnect a battery terminal and turn the key. Effectively rebooting all the computers. It might work.
Put the main gearbox in neutral, with the engine running switch the tbox to each setting several times. Often the mechanism gets sticky and needs freeing up.
If no joy, then I would remove the actuator mechanism from the side of the transfer box.
You can then check the actuator is doing the right thing, also accessing the spindle that operates the tbox which can be turned to manually change gears.