If someone has surgery, they are likely to be off work, increasing costs, vs taking a pill off duty that wears off in a few hours and does not preclude working afterwards. 

Furthermore, that $41 million includes the VA and retired service members, does it not? Can ED be service related? As a secondary symptom of another problem, yes. Look it up. Hormones and reassignment are not necessary because of military service. The Rand study is an estimate on transgender medical costs done when transgenders weren't allowed to enlist and before October when Carter said the military would pay for reassignment surgery.  And if it's for active duty only, comparison should be made to active duty cost only for whatever medication.