$\newcommand{\tr}{\mathrm{Tr }}$ Let be $\mathcal{M}_n(\mathbb{C})$ the set of complex-valued square matrices of order $n$ and $[A, B] = AB - BA$ a commutator.
If, for some $A, B \in \mathcal{M}_n(\mathbb{C})$, we have $[A, [A, B]] = 0$, then $[A, B]$ is nilpotent.
So: $[A, [A, B]] = 0$ says that $A$ and $[A, B]$ commutes.
Let be $\lambda \in \mathbb{C}$ and $X \in \mathbb{C}^n$ such that $[A, B]X = \lambda X$ (an eigenvalue/eigenvector pair), such values always exist as $[A, B] \in \mathcal{M}_n(\mathbb{C})$ and must have $n$ eigenvalues.
Left-multiplication of the previous relation gives: $A[A, B]X = \lambda AX$.
By hypothesis, we have: $[A, B](AX) = \lambda (AX)$.
If we denote $E_{\lambda}$ the set of eigenvectors of $[A, B]$ for the $\lambda$ value, we have: $X \in E_{\lambda} \implies AX \in E_{\lambda}$.
As a result, for all $k \in \mathbb{N}, A^k X \in E_{\lambda}$.
Now, we also have $\tr [A, B] = 0$ because of properties on the trace.
If $A$ is not nilpotent or nilpotent for $k \geq n$, then: $(X, AX, \ldots, A^{n - 1} X)$ is linearly independent, as $\dim E_{\lambda} \leq n$ and $\dim E_{\lambda} \geq n$.
We conclude that $\dim E_{\lambda} = n$, finally: $n \lambda = 0$, now: $\lambda = 0$.
We conclude that $[A, B]$ is nilpotent.
If $A$ is nilpotent for $k \leq n - 1$, then $\dim E_{\lambda} \geq k$.
Here, I don't really know how to proceed, I'd like to show we cannot have any other value than $\lambda$ and it must be $0$ due to the trace.