I don't know if I would call stabbing your allies in the back "foreign policy independence." But of course, Turkey has turned into a dictatorship itself and so has much in common with Putin's Russia. I can't see how these two countries are "state sponsors of terrorism" given that they are democracies who respect such principles as human rights and do not have one man rule systems like Turkey.
We had a coup attempt which was organized by CIA back in 2016. Have you ever heard of this? You stabbed in the back. That is why Turkey acquired S-400s from Russia.
Turkey is a democratic country with free, legitimate and fair elections despite all the US attempts to kill democracy in our country. It is laughable that you call Turkey a dictatorship while the US is in the bed with countries like Saudi Arabia, Egypt, Venezuela etc. It is clear that Pentagon/ US Congress and US administration see Turkey's power gaining as a threat to US interests.
Turkey oppose Swedish and Finnish bids because both countries host a terrorist organization. Particularly, Sweden aids terrorists more than $300 million each year. This is unacceptable for Turkey.