Heat metal says (Emphasis mine) :
Choose a manufactured metal object, such as a metal weapon or a suit of heavy or medium metal armor, that you can see within range. You cause the object to glow red-hot. Any creature in physical contact with the object takes 2d8 fire damage when you cast the spell. Until the spell ends, you can use a bonus action on each of your subsequent turns to cause this damage again.
The target in this case was Animated armour (which is a construct).
In our session we did rule that it could work just because it fit well with the story. We played it out that the metal was melting and deforming so the joints wouldn’t work. However the issue we had comes down to:
Can something be both an object and a creature?
The armour needs to be a manufactured object for the spell to work (and it specifically mentions a suit of metal armour) but also needs to be a creature to take the damage.