Actually, one recent work on n-body gravitational methods found that "nuclear explosives remain an indispensable element
of the planetary defense portfolio." [0]
In particular, although these dispersion methods (as you pointed out) don't typically reduce the impact energy to zero, they offer a roughly 2 order-of-magnitude decrease in impact energy while requiring only month-scale warning.
In contrast, diversion techniques which can reduce the impact energy to 0 (e.g. by shifting the impactor to 'miss' our planet) can require decade-scale to accomplish their goal.
[0]: https://www.sciencedirect.com/science/article/pii/S009457652...