If you believe that the assassination of Soleimani was justified because he planned attacks against American forces, then logically Iran would be justified to kill Mark Esper (as well as several other people around him in the explosion). As Secretary of Defense Esper holds the equivalent position in the U.S. government that Soleimani held in the Iranian government, and there is no question that Esper and his department are currently planning attacks against Iranians.
The only reason 99% of the people who think Soleimani's murder was okay do not accept that train of logic is because deep down they think it is more acceptable to murder Iranians than it is to murder Americans for the exact same conduct. This double-standard runs throughout the foreign policy establishment. If a country intentionally killed the British, French, Japanese, or Israeli official in charge of their military, it would be called terrorism and deemed illegitimate, no matter what military adventures the people under the official's command had done. But killing an Iranian official... well, that guy had it coming.
The only reason 99% of the people who think Soleimani's murder was okay do not accept that train of logic is because deep down they think it is more acceptable to murder Iranians than it is to murder Americans for the exact same conduct. This double-standard runs throughout the foreign policy establishment. If a country intentionally killed the British, French, Japanese, or Israeli official in charge of their military, it would be called terrorism and deemed illegitimate, no matter what military adventures the people under the official's command had done. But killing an Iranian official... well, that guy had it coming.