India's first indigenous fighter jet (Tejas) took 30 years to develop. It is 4th generation and is not nearly as capable as the F-35.
The JF-17 Thunder was jointly developed by the Pakistan Aeronautical Complex and the Chengdu Aircraft Corporation of China. It is a 4th generation aircraft.
Turkey could try, but there is no way they could develop a 5th generation aircraft.
Turkey has roughly three times the economy of Israel and industrialized. And I have no idea why 5th generation is a silver bullet. Build a Mig-21 or F-5 with more efficient powerplant and integrate with modern weaponry. That would make a potent combatant for most missions. Won’t cost $200 million each too.