See this comment on GitHub: https://github.com/sp614x/optifine/issues/2732#issuecomment-518751120
As far as I can tell, that's exactly what i'm doing. I have twilight forest set to the ID of 4, and made a folder sky/world4. But...no sky. I also tried it with a test dimension I made with Just Enough Dimensions, that didn't work either.