The commentaries say he made the golden calf cause he was scared they would kill him as they did Chur. But aren't you supposed to let yourself be killed rather then commit/create idolatry?
Essentially, all prohibitions are pushed aside when threatened with death, except for three notable exceptions: Idolatry, Adultery, and Murder.
Here are some possible suggestions why it would be permitted to create the Golden Calf (under threat of death):
Facilitating idolatry is not Idolatry
Ahron himself did not serve the idols, but facilitated the Jews to do so by creating it. This is a transgression of lifne iver lo siten michshal, not of Idolatry itself. This would be the eqivalent of handing a murderer the weapon to commit the murder, which is not a cardinal sin [See Ba'al Hamaor and Milchamos to Sanhedrin 74b, and R' Elchonon Wasserman Kovetz Ho'aros #48].
Creating an idol is not Idolatry.
Ahron himself did not serve the idols, but rather the sin of creating a molten idol (Vayikra 19:4). This prohibition is not included in the three cardinal sins.
The Ramban (Exods 32:21), however, posits that this act of creating the Golden Calf is included in the above category, and therefore Ahron should have allowed himself to be killed.
ואיננו נכון בעיני, כי החטא הזה מן החטאים שיהרג ולא יעבור
I would assume that this is not because of lifnei iver (because the aforementioned Ramban in his Milchamos Hashem to Sanhedrin writes that lifnei iver is not prohibited in face of death), but because he considers creating idols to be avuzrayhu (peripheral acts that are related to Idolatry). [See R' Elchonon Wasserman, Kovetz Ho'aros #48]