Sounds like a connection problem. Check all the cable connections and the connections at the starter including the ones at the solenoid to the starter motor.
If all the connections are good you may need a new solenoid because the contacts are pitted causing the motor not to run.