The only complete 2 year exemption that exists is the treaty exemption for teachers. If you are not an educator this will not apply.
The UK has detached duty rules that permit those on short-term assignments of up to 2 years to deduct expenses such as temporary accommodation, which might alternatively be what you have heard?