Yes, in theory that would work. How would we go about doing that?
I haven’t been able to find anything specific about the orbit of the asteroid, but the basic task involves a rather large rocket and a rather large H-bomb, and high-precision navigation to ensure it goes off on the proper side of the asteroid, to push it away from Earth rather than towards Earth.