Prove: $ 4 \nmid (n-2)^2 \implies 6 \nmid n $
Proof by contrapositive:
$ 6 \mid n \implies 4 \mid (n-2)^2 $
$n=6k,$ $ k \in \mathbb Z $
$((6k)-2)^2 = 36k^2 - 24k+4 = 4(9k^2 - 6k+1), (n-2)^2=4c$
with $c=(9k^2 + 6k+1)$ and $c\in \mathbb Z$.
So it proves that $ 4 \mid (n-2)^2 $.
Is this the correct way of proving this example?
Your proof is correct. I holds even more general that: $$n\text{ even}\implies 4|(n-2)^2.$$ And since $n$ is even when $6|n$, we will have $6|n\implies 4|(n-2)^2$, as wanted.