Upgrade to Lineage Os 14
The Exynos variant of S4 doesn't have official LOS yet. Assuming you're talking about the unofficial one here.

Update to the latest recovery possible, e.g. TWRP here, or this one as suggested in the XDA thread.

Do a nandroid backup of what you have now for falling back when needed.

Factory reset - don't think about dirty flashing between major Android versions.

Flash the ROM of choice.