There are slight differences.
"不可避免“ is more formal, so you should use this more in writing,while "免不了” is usually used in speaking.
For example:
战争是不可避免的。
War is unavoidable,
夏天免不了要开空调。
It is inevitable to use air conditioner in summer.
And sometimes, they are exactly the same, you can use both in some context.