If the US government actually wanted to (mostly) eliminate cash, they could just stop printing currency, and wait for what's in circulation to wear out. That would take about 23 years [0]. As it is, though, only about 8% of all USD exists in physical form [1], anyway, making the USD largely a digital currency already.
---
[0]: https://www.federalreserve.gov/faqs/how-long-is-the-life-spa...