What Trav means is get the starter motor to turn by using a wire from battery positive to the starter solenoid signal wire. They sell a "button starter" tool which is two long wires attached to a momentary switch or you can do it with long jumper cables. It's to remove variables between the key and the starter solenoid (faulty ignition switch, ECU, etc.)
If the starter is accessible, remove it and get it tested at a starter rebuilder shop and see if they can duplicate the issue on the test bench.
I had something similar happened to my Toyota Tundra V8 (yes the dreaded UZ engine) and the solenoids were [censored] out intermittently. Because it's a shared vehicle I replaced the whole starter as a precaution.