The Prohibition of Residing Among the Disbelievers While Able to Emigrate
Al-Bukhari recorded that Muhammad bin `Abdur-Rahman, Abu Al-Aswad, said, "The people of Al-Madinah were forced to prepare an army (to fight against the people of Ash-Sham during the Khilafah of Abdullah bin Az-Zubayir at Makkah), and I was enlisted in it. Then I met `Ikrimah, the freed slave of Ibn `Abbas, and informed him (about it), and he forbade me strongly from doing so (i.e., to enlist in that army), and then he said to me, `Ibn `Abbas told me that some Muslims used to go out with the idolators increasing the size of their army against the Messenger of Allah ﷺ . Then, an arrow would hit one of them and kill him, or he would be struck on his neck (with a sword) and killed, and Allah sent down the Ayah,
The third verse (96) too recounts the same degrees of precedence that the Mujahidin have over others.
Ruling
Jihad is not obligatory on the lame, the crippled, the blind, the sick and on others who are excusable under the Islamic law.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 98–99
A believer naturally wants a free environment where his believing personality may find full opportunities to express itself. If he finds the environment unfavourable, he had better change his surroundings. This change of place is called hijrah (emigration). Thus, in the real spirit of hijrah, one should remove oneself from an unfavourable to a favourable situation. Let us take the example of a person who is associated with an organisation which is dominated by certain personalities. He realises that he may exist there only as a glorifier of those personalities and not as a glorifier of God. Now, if for the sake of self-interest he compromises with that atmosphere and fails to proclaim the truth as he sees it, and then, still in the same state, he breathes his last, it might be said that in that case, he had perpetrated an injustice against his soul.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.