I am not a teacher.
It's "in two years' time". If it was one year, the apostrophe would go before the "s". The reason the apostrophe is there is that "two years time" would be unidiomatic and ungrammatical. I know that that is not a good reason, but English can be quite stubborn and unreasonable at times. The time belongs to the years in a way. It's the time of the years.