ざるを得ない・を余儀なくされる: the difference
ざるを得ないN2
Meaning
Can't help doing, Have no choice but
Past papers
Tested 3 times in past papers
Example
サプライズのプレゼントに、驚かざるを得なかった。
I couldn't help but be surprised at the surprise present.
を余儀なくされるN1
Meaning
To be forced to do something
Past papers
Tested once in past papers
Example
景気悪化のため、会社は閉鎖を余儀なくされた。
Due to the economic downturn, the company has been forced to close down.
How to tell them apart
「ざるを得ない」 follows a verb: the person weighs things up and concludes 'I have no choice'. It is more subjective: 「行きたくないが行かざるを得ない」.
「を余儀なくされる」 follows an action noun (中止, 延期, 変更, 撤退): purely imposed from outside, with no say for the person. Formal news style.