Apple did not make a 2016 iMac. If you purchased it in 2016, its most likely a 2015 iMac.
You may be able to use a mini display port to HDMI cable. You would plug the mini display port side of the cable into one of the Thunderbolt ports on the back of your iMac.
The flickering however may be the graphics card, so the external display may flicker as well.