You steal a car from the house of a millionaire (who owns ten cars) because your family can't afford one.
Your car breaks down on a cold, snowy winter night. Your family is in danger of freezing to death. You steal a car from the house of a millionaire (who owns ten cars) and drive to safety.
The first case is an example of the ends justifying the means. The second case is an example of choosing the lesser evil.
On the one hand is the evil of failing to do whatever it is you needed the car for. On the other is the evil of theft. The difference between the two cases is that the former evil is trivial (e.g. you can't spend as much time with the family because you have to ride the bus) in the first case and severe (e.g. you can't protect your family's lives) in the second case.
Or, alternatively, you are contemplating the means of grand theft auto to achieve the end of being able to drive home from the office (first case) or to achieve the end of saving the lives of your family (the second case).
Again, a distinction without a difference.
(And, even if we stipulate that there is a difference, you have utterly failed to respond to the arguments raised by people who have actually read the HP books that the protagonist is, in fact, correctly choosing the lesser of two evils when he finds it necessary to do so.)