2014 yeah, only under Yanukovych who was on Russia's side. 2005-2010, Yushchenko publicly stated that he wanted Ukraine to join NATO and was taking steps towards it, while both Bush and Obama supported expanding NATO to Ukraine.
"I welcome the decision by President Viktor Yushchenko, Prime Minister Yulia Tymoshenko, and Parliament Chairman Arseny Yatsenyuk to declare Ukraine's readiness to advance a Membership Action Plan (MAP) with NATO" -Obama
Before 2005, there were already smaller steps taken, including granting NATO military access. 2005 was a disputed election with both Russia and US involved.
Why does history have to start in 2010 for a 2014 war? You're picking a Russia-backed presidency that was getting ousted before Russia attacked. There's no way they were going to stay nonaligned. That 2010 law was just a law, signed by the president, undoable by the next (and it was undone).
"Russia then occupied and annexed Crimea, and in August 2014 Russia's military invaded eastern Ukraine to support its separatist proxies. Because of this, in December 2014 Ukraine's parliament voted to seek NATO membership, and in 2018 it voted to enshrine this goal in its constitution." (https://en.wikipedia.org/wiki/Ukraine%E2%80%93NATO_relations)
A full ten months elapsed before Ukraine finally decided to change its constitution. That rather destroys your argument.
Russia attacked directly after Ukraine removed their nonalignment leadership. I'm not saying Ukraine changed its constitution before the attack, just that the 2010 law was evidently possible to reverse.
Even if Russia didn't attack, Ukraine would've gone back to NATO alignment just as they were doing pre 2010. Maybe even more seeing how the entire point of the 2014 revolution was to push away from agreements with Russia, and the protest leaders were all loudly pro-NATO politicians. How could this possibly have led to nonalignment, aside from "this is a Russian talking point"?
"I welcome the decision by President Viktor Yushchenko, Prime Minister Yulia Tymoshenko, and Parliament Chairman Arseny Yatsenyuk to declare Ukraine's readiness to advance a Membership Action Plan (MAP) with NATO" -Obama
Before 2005, there were already smaller steps taken, including granting NATO military access. 2005 was a disputed election with both Russia and US involved.