When someone incorrectly thinks that they have found or recognized a particular person, you refer to this as a case of mistaken identity .
The dead men could have been the victims of mistaken identity. Their attackers may have wrongly believed them to be soldiers.
N-UNCOUNT