protected section has to be inside the class definition. In your case it’s outside and that’s why it’s not compiling. Also you cannot have the same method declaration twice so do not add SetupPlayerInputComponent twice, one is enough.
protected
SetupPlayerInputComponent