I had a starter solenoid cause that problem,disconnect the other small terminal on the solenoid and see if it will stay running. The other terminal gives a shot to the ignition while starting and sometimes it can short out the ignition if the solenoid goes bad and had a couple do that,if that is not the problem look into the module on the fenderwell.