Get a cheap volt meter, not a test lite.. check the bat. voltage before starting.. then again while running to make sure the bat. is charging, then again when it shuts down..
IF the bat. voltage is the same or higher when it shuts down, as it was before you started the engine, you can probably rule out a weak battery or alternator.
MAKE SURE all your fluids are up to the proper levels..& the alt. belt is in good condit. & tight.
If all that checks out, disconnect the solenoid connector.. and look at the connector, it might have corroded, clean the contacts and plug back in..
Those solenoids are REAL BAD about failing, its VERY common.. so if the previous checks check out, I suggest replacing the sol.
Its only 2 or 3 screws.. easy.