In general the chiral non-Abelian anomaly does not vanish. It is proportional to the three dimensional symmetric tensor
$$ d_{ABC} = \mathrm{tr}(T_A\{ T_B T_C\})$$
This tensor vanishes in the particular case of $SU(2)$, but it is
nonvanishing for $SU(N)$, for $N>2$.
It should be also mentioned, however, that in the special case of $SU(2)$ there is a special anomaly called the Witten's $SU(2)$ global anomaly (please see the following lecture note by: Roberto Catenacci). This anomaly vanishes when the
number of doublets is even.
In addition if the gauge group is $SU(2)_L \times U(1)$. Then the $SU(2)$ axial anomaly does not vanish either for a single doublet, because of the triangle diagram with two outcoming photons. However, in the standard model this anomaly cancels because the contribution to this diagram is proportional to the square of the electric charge times the
isospin. It is easy to see that for each generation, the total coefficient of a single generation vanishes:
$$3(\frac{4}{9}-\frac{1}{9}) -1=0$$
where the factor $3$ counts the number of colors.