Let $n\in \mathbb{N}$ such that $n \equiv 5$ (mod $6$). Then there must be a prime factor $p$ of $n$ such that $p \equiv 5$ (mod $6$).
Let $n \equiv 5$ (mod $6$) such that $n=p_1^{a_1}p_2^{a_2}\cdots p_m^{a_m}$ where $p_i$'s are distinct primes. Any prime is either congruent to $1$ or $5$ modulo $6$, so if all $p_i$ are congruent to $1$ (mod $6$), i.e. $p_i=6k_i+1$, for some $k_i$ in $\mathbb{N}$, then $n=(6k_1+1)^{a_1}\cdots(6k_m+1)^{a_m}$. But then $n\equiv 1$ (mod $6$) because the constant factor in this product will always be $1$.
Is this proof correct? Did I miss any details?
Your proof is correct but is better phrased as proof of the contrapositive: