You called your own class “GUI” so you’re hiding the “UnityEngine.GUI” class and the compiler searches inside your GUI class for a method called Button which doesn’t exists.
You should rename your class (and filename) to something else.
ps: In your comment you just said “you fixed it” but you didn’t accepted an existing answer nor have you provided your own solution to close this question. Please accept an answer or close the question.