Chosen Solution

Also i went to a phone repair place and they told me it was an issue with the power button and that it needed to be replaced. I searched online several places and couldn’t find any evidence to support that. When i rebooted the phone and tried to do a factory reset it was stuck in download mode for at lease 8 hours.

Yeah it’s not power button as it can stay in download mode for 8 hours. It’s most likely a software issue. Follow these instructions on how to flash Samsung firmware on your phone. If it’s stuck on white Samsung logo you most likely will need to wipe data / factory reset after flash. If it’s stuck on coloured Samsung logo it will most likely only require flashing firmware.