Yes, upgrades are always free, and new iOS versions are typically supported on several generations of older devices.
The differences between feature sets on different generations is less and less it seems though. If I recall correctly, the differences between the iPhone 3G and iPhone 4 was bigger than for instance iPhone 6 and iPhone 7. If I weren't such a sucker for new and shiny things, I'd probably buy an iPhone SE today.
that was the last android phone I owned.