> Ukraine didn't have ambitions to join NATO before Putin attacked it for the first time in 2014
That's just not true.
> NATO welcomes Ukraine’s and Georgia’s Euro-Atlantic aspirations for membership in NATO. We agreed today that these countries will become members of NATO.
This is from the 2008 Bucharest NATO meeting official declaration. [1]
[1] https://www.nato.int/cps/en/natolive/official_texts_8443.htm