Following Geoffrey's comment, we prove that for $n > 1$, Nil$(\mathbb{Z}/n\mathbb{Z}) \neq 0$ iff $n$ is not squarefree (i.e., $n$ has a square factor). Let $n = \prod_{j=1}^r p_j^{v_j}$ be the prime factorization of $n$.
($\impliedby$): Suppose $n$ is not squarefree. Then it has a square factor--by taking the prime factorization of that square, we find that $p_i^2 | n$ for at least one $p_i$ in the factorization of $n$. Hence $c = n / p_i^2 \in \mathbb{Z}$. If we let $m = p_ic = n/p_i \in \mathbb{Z}$, then we see $0 < m \leq n-1$ and
$$
m^2 = \left(\frac{n}{p_i}\right)^2 = \frac{n^2}{p_i^2} = cn,
$$
hence $n|m^2$, yielding that $m^2 \equiv 0$ (mod $n$) and therefore $m \in$ Nil$(\mathbb{Z}/n\mathbb{Z})$. Because $m \neq 0$ in $\mathbb{Z}/n\mathbb{Z}$, we conclude Nil$(\mathbb{Z}/n\mathbb{Z}) \neq 0$ as desired.
($\implies$): Contrapositively assume $n$ is squarefree. Then none of its prime factors can have $v_j \geq 2$, lest we have $p_j^2|n$. But this means $v_j = 1$ for each $j$, that is, $n = \prod_{j=1}^r p_j$. Let $m \in\mathbb{Z}/n\mathbb{Z}$ be given, and suppose $m^k \equiv 0$ (mod $n$) for some positive $k \in \mathbb{Z}$. Then $n|m^k$, so there exists a $c \in \mathbb{Z}$ with $m^k = cn = c\prod_{j=1}^r p_j$.
We see that each $p_j$ divides $m^k$, so $p_j|m$ by primality. Because the $p_j$ are distinct primes, we see $\prod_{j=1}^r p_j | m$ also, that is, $n | m$. But then we have $m \equiv 0$ (mod $n$). Therefore Nil$(\mathbb{Z}/n\mathbb{Z}) = 0$ and we are done.