I have tried going into recovery mode and download mode but the phone only stays on a few seconds before it turns off before I can do anything. I have also tried a battery pull.
Did you try to enter Recovery, and do the battery pull, as an attempt to fix a problem of the phone switching off or failing to start? Because unless I have misunderstood you, it sounds to me like battery failure. More details would be helpful.
this issue has happened before. I just kept trying to turn it on again and again and then it finally worked. This time I got it to turn on but then it shut off again. I have two batteries for my galaxy s4 and have tried both. And yes i tried pulling out the battery and entering recovery as an attempt to get the phone to turn back on. Im hoping to get it into recovery mode so I can reset the phone.
Assuming both batteries are good...apparently there were a lot of duff S4 batteries...it may be a problem with the power button.
You may have read this which includes a tip for powering on with a duff button as long as you have a PC: