MacBook Pro constantly “restarts because of a problem” and when I go into recover mode, I can’t reinstall Mac OS because I can’t connect to wifi because “I’m not close enough to my router” even though my wifi is

When I opened up my computer this morning, I was greeted with a message that said “your computer restarted because of a problem, press a key or wait a few seconds to restart.” when I do this, the Apple logo and loading bar flash on instantly and the loading bar is full, then a couple secconds later my screen turns black and it takes me back the the “computer restarted because of a problem” screen. When I tried to reinstall macOS, I attempted to connect to the internet but it said that I “cannot connect and I am not close enough to my router”, but my router is in the same room as I am. Is there anything I can do to either fix the constant restarting of my MacBook, or the wifi connectivity issue? I have seen a previous post about the same wifi issue in recovery mode, and it has been left without a fix since 2014.

MacBook Pro with Retina display, macOS Sierra (10.12.6)
Has invited:

To reply to a question, please Login or registered