If it was that simple, then why is Putin only invading now? He has had plenty of opportunity before (while Ukraine was weaker) but had attempted to absorb Ukraine by infiltrating its politics. The fact that someone is an expansionist doesn't make them irrational (and Putin, in particular, unless his mental state has changed or this outward impression has been fabricated, appears to be a rational and calculating individual who plays the long game). If there was a less messy way of pulling Ukraine into Russia's orbit, why wouldn't he have taken it unless something was forcing his hand?
If the premise is that aligning with NATO would have kept Ukraine safe, that attempt has immediately failed. This isn't some moral philosophy college class, and we aren't debating whether or not to press the "Enforce Freedom" button. Instead, joining an international organization is a gradual process, not a binary transition, and Putin threw a wrench in the works just as the process had started (and could have at any point).
It would be nice if Russia got its own Kemal Ataturk instead of Putin, someone who cut ties with the USSR (or Tsarist Russia or whatever) in the same way that Ataturk cut ties with Turkey's Ottoman past. But Russia didn't get that and we have to accept that reality.
On the other hand, if this war is a consequence of some bigger game (some internal power struggle within the Kremlin, some attempt to overthrow the dollar's reserve status, a Putin project to demonstrate his power, some combination thereof or something else entirely), then this isn't immediately obvious to me and I don't know enough about Russia to speculate authoritatively. But dismissing the NATO possibility outright is stubborn.