It would have been difficult for the Ottomans to thoroughly beat the Portuguese, their only realistic sea route to the east. It was a combination of a lot of things though, like huge hostile borders and that they had a more urgent naval theater in the eastern Med. The kind of ships best suited for that area are not the best for the Indian Ocean so their attention and resources especially were divided. It takes a lot to run a ship building program especially one so far from the "home base" in Constantinople and then they started to fall behind in terms of naval tech (post 1600s).
I don't think it's impossible but it's a tough thing to bring about.
I don't think it's impossible but it's a tough thing to bring about.