For $n\geq 2$ we need the condition that $G$ is abelian to say that this is a subgroup.
That statement seems to be saying that $\{g^n\mid g\in G\} = G^{\{n\}}$, with $n\geq 2$, is a subgroup only if $G$ is abelian. But this is not correct. "$G$ is abelian" is sufficient, but not necessary.
For an easy example, consider $G=S_3$ and $n=6$. Then $G^{\{6\}} = \{g^6\mid g\in S_3\} = \{e\}$ is a subgroup, even though $G$ is not abelian.
More generally, a group $G$ is said to be $n$-abelian if and only if $(ab)^n = a^nb^n$ for all $a,b\in G$. Alperin proved that a group $G$ is $n$-abelian if and only if it is a quotient of a subgroup of a direct product of a group of exponent $n-1$, a group of exponent $n$, and an abelian group. (It is easy to verify that if $G$ is of exponent $n-1$, of exponent $n$, or abelian, then it satisfies $(ab)^n= a^nb^n$; and that the class of groups that satisfy this condition is closed under products, subgroups, and quotients).
If $G$ is $n$-abelian, then we have that $G^{\{n\}}$ is necessarily a subgroup, since it is trivially closed under inverses, contains $e=e^n$, and in the $n$-abelian case we also have $g^nh^n = (gh)^n\in G^{\{n\}}$.
However, a group need not be $n$-abelian for this set to be a subgroup, either. For example, consider the dihedral group of order $8$, which is not $2$-abelian (a group is $2$-abelian if and only if it is abelian). Then $G^{\{2\}} = \{e,r^2\}$, since every element other than $r$ and $r^3$ is of order $1$ or $2$; this is clearly a subgroup of $G$.
Not sure what you mean by "counter-examples for each $n$". If you mean, for each $n$ find a group in which $G^{\{n\}}$ is not a subgroup, then they aren't hard to find, even restricting for finite groups. For odd $n$, the set $(S_n)^{\{n\}}$ contains all transpositions but no cycle of length $n$. I'll let you figure out the even $n$ case.