This is a very long and complex sentence comprising two independent clauses connected with the coordinator "and". With the first clause seemingly clear to you, let's focus on the second clause:
Harry realized [that he was talking to Hogwarts and to all the surrounding area], [that the residents of Hogsmeade and all those still fighting in the castle would hear him as clearly as if he stood beside them, his breath on the back of their necks, a death blow away.]
Harry realizes two things, described respectively in two that-clauses. Again, let's get rid of the first that clause and focus on the second one. It consists of a series of adverbials modifying and describing how Voldemort's presence seems to the residents of Hogsmeade.
That presence feels "as if he stood beside them", "[as if] his breath on the back of their necks", and "[as if it is] a death blow away."
Death blow is a set phrase meaning a killing action or event, or something so powerful that it kills or ends something else. See Merriam Webster:
a forcible stroke that kills a living thing : an act that ends the life of a person or animal
If you say A is "a ___ away [from B]", the distance between A and B is that thing in the blank. And the "from B" part is omissible. "The exam is just one week away" means you have one week until the exam. People also use "a lifetime away" to figuratively describe something that seems like it is never going to happen.
So "a death blow away" means the residents feel extremely close to Voldemort. How close? "A death blow away," namely, dangerously close. You do not need an actual distance or time duration word for this phrase. And yes, this is a metaphorical use of the phrase. In a similar vein, if a TV commercial says "You are one phone call away from winning the prize!" It is urging you to call, exaggerating how close you are to the prize, as if all you have to do is pick up your phone and call. Here is another example: say a yogurt store gives their customers cards they can use to collect stamps. Each visit gives a customer a stamp, and with 10 stamps you can claim a free yogurt. So when you have 8 stamps on your card, you are 2 stamps away from a free yogurt.
Think of it this way: if you are standing in a tree and I am under it, you are "one jump away" from me. Because to reach me, you would need to jump off the tree--you need to finish this "jump" action so that you can reach where I am. By the same token, the residents of Hogsmeade are close to Voldemort, and the distance is "a death blow". To reach Voldemort, they would have to undergo a death blow. The author figuratively describes Voldemort as death. To reach him would mean death for other people. That is how dangerous the author makes you believe Voldemort is.