That's not true. It's not just up to Ukraine to join NATO, it has to get approval for it. Beyond that, the US directly and blatantly meddled in Ukrainian affairs to make that happen.
But they're not free to join NATO, are they? They need approval of all member states to do so. Last time they tried, France and Germany almost prevented them from joining. If they are free to choose NATO, why aren't they a member right now? Why aren't they a EU member? Why isn't Turkey a EU member?