Trump would not have allowed the Ukraine to join NATO, ergo Russia would have had no reason to invade the Ukraine. So you analysis is incorrect. No NATO, no invasion.
Ukraine us part of NATO? Who knew?
I would be surprised if the U.S. was still part of NATO at this point in his second term. And I think Putin knew that as well.