Hate to be the party-pooper, but there's a difference between gifting to a politician as an individual, and gifting to a politician in their role.
If the plane were a direct gift to Trump, that he could continue to use for the rest of his life, there would be a problem as that is a gift to him directly which has monetary value.
As the plane is a gift "to the President of the United States" that, once Trump has completed his term, will go into the Presidential museum, it has no monetary value to Trump.
All the gift of the plane actually means is that he'll get to fly in a (maybe slightly more) luxurious plane until his term is up. Could that sway any decisions he makes? Maybe. But as Trump himself doesn't gain beyond having a nicer plane for a few years, it's legal.