America. No other country is even in second place.
1. Nukes. Lots of 'em. Duh.
2. Most advanced army in the world, costing about as much as the rest of the world's militaries combined. Not the largest, but in an invasion it would immediately be made immensely larger by the draft-- remember, it's the third most populous country on Earth.
3. Total air and naval supremacy. America's navy is larger than the world's next thirteen largest navies combined. It has both the largest and second largest air forces in the world (the former belonging to the U.S. Air Force, the latter belonging to the U.S. Navy). China may have numbers, but what good are they if they can't even land?
4. Largest economy in the world. Has the industrial capacity to continue pumping out armaments over the course of a protracted war. Also, its industry is self-sufficient, since domestic steel, energy, and manufacturing industries means it doesn't have to rely on imports in case of an embargo.
5. Backed up by the broadest military alliance in history, NATO, including two other nuclear-capable members. Also allies with Japan, which doesn't have nukes but stands prepared to get them on a moment's notice.
6. Strong civilian resistance is guaranteed. Countries used to broad liberties and democratic governance are even less likely than other countries to accept an occupation, and countries with nationalistic populations doubly so. America has a combination of high liberty and high nationalism. The legitimacy of the government is universally recognized, and minority discontent is relatively low, meaning there's no natural group of collaborators for occupiers to look forward to. And, as many people have pointed out, civilian resistance would be unusually effective, since it's the most armed country in the world.
7. Geography. Seas to the east and west, a close ally to the north. It's big and has a more diffuse population than Europe, therefore harder to control. None of Russia's environmental defenses, but modern logistics are making that sort of thing less effective anyway.
It certainly doesn't win longest invasion, because the invasion would probably never even reach American shores.