Even if China electrified their transport systems, they haven't, but if they had, they still need fossil fuels for fertilizers. The US will not go down quietly. A single carrier squadron could blockade china from middle eastern oil.
That said I hope no such conflict ever happens. The US and China do not have to be enemies.