"For two weeks" refers to the duration. "In two weeks" (in your context) means "after two weeks".
Let's imagine that today is the 1st of August.
I am on holiday for two weeks = I am on holiday from the 1st of August until the 14th of August.
I am on holiday in two weeks = I will start my holiday on the 15th of August.
As a general rule, when talking about time references, "for" means "for the duration of" or "lasting for a period of" and "in" means "after".
So if you are currently taking a two-week holiday, you would say "I don't have school for two weeks!" or perhaps more naturally "I've got two weeks off school!"
Student or Learner