The Treasury Department had planned to replace Hamilton on the currency with a female historical figure.