Yes, you need to unroot if you want to do an OTA update or have it flashed. When I rooted my S5, I had to go through several updates to do the final one.
Even not running a custom ROM, the phone sees it that way for updating when you are rooted.
You might have to reflash a kernel and then go through some updates. Let me see what someone else might can tell you. I'm very limited on rooting experience.
The bad news is I think you are probably going to have to go through several OTA updates. You probably can flash them with Odin, but that is going to take a lot of big file downloads. The other possibility.. Once you unroot, you might can use Kies to update, no guarantee though.
I don't think Kies will work. It still might see a tampered device. Flashing the stock ROM will probably be the only way to get rid of root completely.