Apple slipped up and sent out a security update that accidentally blacklisted the ethernet driver for a short period of time in several Macs.

Connect the iMac via WiFi and it will fix it's self after about a day. Or follow the more involved steps in this support article.

https://support.apple.com/en-us/HT6672