I couldn't say whether it fits or not, but even if it does it'd look a bit odd as the 416 upper is taller than that of an m4, and you'd therefore have a 'step up' between the top of the rail and the receiver
Really you should be looking at geissele rail's for a HK platform gun. As M_P said m4 rails would look silly on a gun with a different receiver to m4's