For the distance, you can use your X and Z differences from the vectors as your A and B in Pythag. That will get you your horizontal distance on a 2D plane. Then use that plus the Y difference as A and B again and it will get you the total distance between your 2 points.
As for the health depletion, the way I did it in my LoL bot was to check their health every .1 seconds and determine the rate using that, them you can calculate when their health should be 0 fairly easily.
OpenProcess gets hooked fairly often via anti cheats as well if you're up for the challenge.