I don’t think comparing transgender people in the military to people who take ED drugs is really fair. After all, not all transgender people opt for surgery (many like to keep their reproductive capabilities intact, for example), and some have had their surgery before they enlist.
Trump isn’t threatening transgender people desiring surgery, he’s threatening ALL transgender people whether they want surgery or not.
Therefore, if comparing to the costs of ED treatment, one shouldn’t consider only those who take these drugs. One should consider everybody with a penis. Let’s see if Trump would kick all those out of the military solely on the basis of what they could potentially cost taxpayers.