The commandment was to all who was there. They were mostly angles but one of the Jinn was with them and he didn’t obey.
He didn’t justify not prostrating by saying you didn’t tell me to prostrate. He justified it by saying that he is better than this human as he was created of fire and we know that angles are created from light.
This means that he too was ordered but he disobeyed.