It's just an interlock solenoid, a safety feature that Japanese vehicles have, you can't remove the ignition key unless the main gearbox is in neutral the same with starting, auto the brake has to be pressed etc etc.
How and why there's one on the disco transfer box you have to Google on that as I don't have that facility, otherwise the box is identical, so just leave it, remove it an fit a plate over the hole... it's up to you.