As others have noted, either the pill or a hysterectomy are morally licit as legitimate medical treatments.
I have to ask though - why dismiss the pill so quickly, but seriously consider a hysterectomy? The hysterectomy is an invasive surgery and results in permanent sterility, and depending on the type of hysterectomy, possibly ongoing issues too. The pill may adequately treat the condition, while preserving the possibility of future fertility as well as different treatment plans that may be kinder to your wife in the long term. Given that it was suggested by your doctor, I think it at least warrants consideration while you explore the implications of hysterectomy further.