In the image below I have generated some isolines starting from the terrain model and I have filtered them within a certain elevation range 800 - 1500m of elevation in QGIS.
As a workaround you could use this workflow:
- You need to translate your Line-Geometry to a Polygon-Geometry. You could use a buffer with a very small buffersize for this. If you habe more than one Ring in the Layer you can buffer just a selected Line. Perhaps there is a better solution for this step.
- Now you can use the Tool deleteholes. Just select the buffer as Input and start the tool.
This workflow will just work for full rings. So it wouldnt work for the red lines in your example untill you "complete" manually the line-geometries to rings.