If you are standing on the left side of the tractor - there is a panel right below the back of the hood in this screen shot I circled in red.
View attachment 699309
Disconnect red + battery cable from the battery.
Remove that panel.
Take a picture of the wiring on the old switch so you can reference that you put the new one in correctly.
Make sure new switch and old switch are exactly the same.
Take wires from old switch and reinstall them on new switch exactly the same way.
Unscrew bezel / trim ring on the outside of old switch (where you put the key in)
Remove old switch.
Install new switch.
Reinstall bezel trim ring.
Reattach red + battery cable to battery.
Test it functions.
Replace panel.