Right click Explode to access Line to Path.
LINE TO PATH converts a series of connected lines or paths into a single path entity. If the chain forms a closed shape, they will be converted into a polygon. This is useful if you have accidentally exploded a large coastline (perhaps one that is fractalised), or imported line chains from another application.
If there is more than one possible line chain, use Just Behind on the line you want to use, selecting the line that you don’t want to keep when prompted for "Move below entity"