Check the trigger wire going to the solenoid
You should see battery voltage on it.
That wire is in a daisy chain from the kety switch through the PTO switch then the Brake switch and finally down to the solenoid.
Key switch is rarely ever the problem so trace the wire all the way before spending money on random part replacement.