Earlier quoted context omitted.
Yeah, sure. But the US chooses who it integrates with militarily. An alternative approach would have been to say "hey, yeah we can see why you'd want to join - but this will foment tensions with Russia, so you can't". That is the kind of diplomacy would have prevented Russia from invading its neighbours. It would have been difficult to get worse outcomes with that approach than what the powers that be managed to get…
I don't think Russia invaded Ukraine because it threatened to join NATO. Russia invaded Ukraine because it threatened to have a color revolution leading to a viable democracy in a culture/society that was similar to Russia's. Putin, personally, could not allow that to succeed. It threatened him, personally, too greatly.
Threatened? They tried that two or three times but Ukraine never stopped being Ukraine. Always losing a couple million people between these attempts.