My proof goes like this
For $n=2$ there are infinite solutions.
Let $x^2+y^2=p^2$ be one such solution.As there are infinite solutions, We can assume that $ p = q^3$ for some integer $q$.
Then after substituting,we get
$x^2+y^2=(q^3)^2$
$x^2+y^2=(q^2)^3$
We found a solution for $n=3$.Instead of $p=q^3$ we can put any power to q.Therefore we can find a solution for any value of $n$.
Is this correct proof or are there any loopholes in my proof or is there any more elegant proof