There's a few things in the starting circuit that can fail. One is the key switch. Another is the transmission range selector. Of course the solenoid is yet another. All three need to work right to engage the starter. I'd start by checking the voltage at the solenoid to see if responds to the key. If it does, then it's the solenoid. If it does not, then you need to look elsewhere.
Check back through the circuit until you can determine which component is at fault. A voltmeter or indicator light will be needed to check for voltage.
If you find that it's the solenoid, check the connections from the battery before replacing it, making sure they aren't the cause.