China's advancement in recent years have made it a formidable military power, but it is still no match for the U.S. military. China has more troops, but the U.S.'s air, naval, and technological superiority more than compensate for its lack of manpower. The U.S. has the most advanced weapons on earth, as well as a history of successful warfare that gives it an advantage over upstart China.
Although China is the largest country in the world by population and could therefore field a larger army, the technological age in which we live makes large armies unnecessary. The United States of America has a much higher GDP, which allows it to innovate deadlier military technology that mare than makes up for its lack of potential soldiers, and the stock of atomic bombs and missiles in the US vastly outnumbers those available to the Chinese.
Although China has a large military and has become a financial juggernaut, it would likely not win a war against the United States. China's primary disadvantage is that it is one of the few remaining communist nations in the world. It has also faced criticism from world organizations for human rights violations in recent years. Other nations might see joining the United States in a war against China as a way to break the communist regime and institute reform.
Do not believe that such a war would be confined to classical warfare. Even though the nuclear weapons in the US would inevitably crush China to non-existence, this would be at a heavy price. Even if ten Chinese nuclear weapons get to their destination, ten major US town will be destroyed. New York, San Francisco, Seattle, ... Count ten. This will be a Pyrrhic victory for the US.
The war in Vietnam showed that even against a much lesser opponent, America does not always win wars; the strength of the opponent's spirit overpowered America. How much worse would America fare in a war where the opponent has one of the strongest economies in the world and one of the largest population bases?