Assalamu Alaikum, There is hadith which says that Prophet(saw) said that Ammar ibn Yasir will be killed by people who are in error and who are wrong doers. Since Ammar ibn Yasir was killed by Muawiyah troops, why the Ahlus Sunnah still believes that he was not killed by wrong doers.
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Ahlus-Sunnah confirm the authenticity of this Hadeeth and believe in what was mentioned in it that ‘Ammaar was killed by the rebellious group. Indeed, he was killed by two men from the troops of Ash-Shaam (Greater Syria) from the army of Mu’aawiyah . But what you do not know is that Ahlus-Sunnah believe that not every rebel is a sinner because rebellion may be due to a reason or it may be without a reason. Therefore, the rebel who has an accepted misconception is not sinful [although he may be in the wrong]; rather, he is a person who made Ijtihaad (a juristic opinion on matters which are not specified in the Quran or the Sunnah) but he was wrong, however, he will get the reward of his Ijtihaad.
Hence, we advise you not to indulge in debates over the disputes that happened between the Companions .
Ibn Taymiyyah said: “The methodology of Ahlus-Sunnah is to abstain from indulging in debates over the disputes which occurred between the Companions as their virtues were confirmed to us and it is an obligation to be an ally to them and to love them. They might have a sound reason for what they had done which is not known to us. Also, it might be a sin from which they had repented and it might have been forgiven. Therefore, indulging in the debates over the disputes that happened between the Companions has led many people to feel hatred for them and to dispraise them, and in this way, a person who does so is wrong and even sinful. In this manner, he harms his own self and also harms others who indulge in the debate about that. This is what happened to most of those who spoke about this as they said something which neither Allaah nor His Prophet likes, either by dispraising a Companion who does not deserve it, or by praising what does not deserve to be praised."
Indeed, Al-Haafith Ibn Al-‘Asaakir has spoken eloquently and beautifully in his book “Taareekh Dimashq” (The History of Damascus) about the biography of Mu'aawiyah as he mentioned that a man said to Abu Zur’ah Ar-Raazi: "I hate Mu’aawiyah.” Abu Zur’ah said to him: “Why is that?” The man said: “Because he fought against ‘Ali.” Then, Abu Zur’ah told him: “Woe to you!! The Lord of Mu’aawiyah is a Merciful Lord and the opponent of Mu’aawiyah (i.e. Ali Ibn Abi Taalib) was a noble opponent, so why do you interfere between the two ?"
Allaah Knows best.
You can search for fatwa through many choices