After ensuring the battery is load tested and good(and cleaning all connections as stated above), try jumping across the solenoid and see if the starter engages properly. If it does, measure the voltage between the solenoid trigger wire and ground when you are trying to start. It's possible you still have excessive voltage drop and the solenoid is not pulling in all the way, and just clicking. It doesn't take much resistance in the safety switch and ignition switch circuit on these older tractors to cause this 'clicking problem'. I have a JD 170 with a 14hp Kaw and had the same problem. Rather than replace all the switches, I installed a 'Starting Improvement Relay' as shown here. That was several years ago and I've never had a starting problem since.
https://www.amazon.com/John-Deere-Starter-Relay-AM107421/dp/B07DF5JVDW
Why does this work? Because the solenoid coils on these engines pull a few amps and hence cause too much of a voltage drop to fully pull it in. What this kit does is put a heavy duty relay right near the starter and solenoid and the coil of this relay draws much less current. Less current >> less voltage drop through the components in the trigger circuit(switches, connections, etc) so it has no problem pulling in when you go to start. When it does, it connects the trigger wire from the solenoid right to the battery voltage available at the solenoid.