You keep making this distinction without a difference.
Any given fact situation can interpreted as "the ends justifying the means" (you must do X, which is bad, to obtain Y, which is good) or "the lesser of two evils" (you must choose between action resulting in X, which is bad, or inaction resulting in not-Y, which is also bad). The two are simply different names for the same moral dilemma.
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.