The price of a 2005(ish) 777-300ER is about $40M, conversion to a freighter about another $30M, so about $70M in all.
Problem being hardening the wiring and ARINC data-bus to the required military standard, which I presume would then need some sort of recertification. Once you add in the AAR certification I’m not sure it would still be such a bargain.
There is also the issue of how much space it takes up. Boeing made a big thing of the wingspan of the MRTT compared to the KC-46 and the issues it raised - and the 777-300ER has a 4m greater wingspan than the MRTT and over 14m greater than the KC-10 it’s intended to replace. Then there’s pavement loading, runway length etc.