صَحَّ اسْتِثْنَاؤُهُ مِنْهُمْ تَغْلِيبًا
As a jinn among them, his exception is explained by treating him with the predominant group.
Predominant-group usage (taghlīb) can name a mixed assembly after its principal members. If nearly everyone in a group is a teacher with one assistant included, a general address to the group can encompass the assistant for that purpose.
Iblis was within the scope of the command to prostrate, so his refusal appears alongside the angels' compliance. Yet being addressed by a command does not entail belonging to the angelic species.