Change location for which gofortran

Setting up /usr/local is something there are nice tools to help with when it gets changed.

I would install homebrew since it has a brew doctor command that will tell you how to fix all permissions in the /usr/local/

Your error is spotted in the first line. If you install gofortran in /usr/local/bin then the make command is wrong trying to execute /usr/local/gofortran - permission denied is the same as "there is no program to run there.

Once you reinstall things - what does "run anything" look like specifically? You might need to ask a follow-on question detailing what you're trying to do in stead of how you tried to fix the error.