Ottomans were already modernizing. I don't know why people insist that didn't happen but it did. But they were indeed much more vulnerable. They were poor in resources, sparse and diverse in population, very exposed geographically, started 19th century with internal chaos, had this unfortunate position of being the traditional bogeyman of Europe, and had this funny arrangement with France that later became the basis for capitulations. Janissary did prevented reform for way too long, but even then Ottomans managed to overhaul its military and administrative systems and adjusted European institutions and ideas into indigenous society, even almost kick started industrialization. 1878 really was the bottleneck, but not only they could've won that, they even bounce back into shape until WW1 slam them down once again, now for good. What they needed was to avoid disasters like that.
With all the drawbacks and obstacles though, they were not going to be as successful at Japan, at least until oil money flows in.