Difference between 不得不， 不免 and 必然?
不得不: have to, there are factors/reasons that force someone to (do something)


  由于过热，我不得不关闭机器
  I have to turn off the machine due to overheating.
  I have no choice but to turn off the machine due to overheating.

不免/难免: would naturally; cannot help but.1 (It sounds more like reasonable than inevitable. See example below)


  工作量大，不免会有失误。
  It'd be normal to make mistakes due to the high workload.
  (The mistakes can be avoided if careful enough. But due to the workload it is very reasonable to make mistakes. You can use 必然 here)

必然: inevitable, certain. (At least the speaker believes so. There may be reasons, or there may be none)


  宇宙中必然有其他生命存在。
  There must be other forms of life in the universe.
  (The speaker believes so, but he doesn't necessarily prove it. There may be no reason given for the statement)