Yes, you'll need to use one port on the back of the iMac to connect the keyboard, but you'll need an adapter, as your keyboard has a different connector to the ones on the back of the new iMac since it plugs in to the ports on the old iMac I'm assuming without any adapter.,
Late 2015 iMac:

M4 iMac

The connector shape and size is different, the actual connection method is the same. i.e plug it in a port on the back, but you need to convert the shape an size of the keyboard cable end to the shape of the ports on the new Mac. That's what the adapter is for.
Unless by USB you actually mean Bluetooth (wireless).