Actually, a common problem with that model, and several other Deere models. Deere made a kit that corrects this.
318 should have an Onan engine, but previous owner could have replaced it with a Kawasaki, or anything for that matter. But if he used the existing wiring harness in the tractor, then this problem happens, regardless of the engine.
The power for the starter solenoid goes through all of the safety switches and interlocks before getting to the starter. This can result in a loss of available voltage and curent to properly activate the starter and starter solenoid.
The kit below uses a relay to stop this, by sending the power to activate the relay through those switches, and the relay then sends full battery voltage to the starter and starter solenoid.
Go to your local John Deere dealer, tell them you want a starter relay kit for a 318. Costs about $25, takes about 15 minutes to install, very easy. There are instructions in the kit, and as long as the previous owner didn't modify the wiring harness in your tractor, its all color coded and simple connections with a couple wrenches and screwdriver. a drill and drill bit might be needed if you can't find an existing bolt nearby to mount the relay.
Part # should be AM107421