The above comment is not true. As per the current rules, a ban comes into effect only after you are working here, have a Resident Permit, decide not to continue working here or get terminated, and the company is not giving you NOC. In your situation, the two year ban is not applicable. To my knowledge, in your case you can apply for a job at a different company even before the expiry of the work visa but the company would have to cancel their visa first to allow for your new employer to get a work visa for you.