Hi everyone

Please help me figure out these two questions below. I'm quite confused about them.
1. Choose the best answer:
The princess was happy during the years
___ she lived with the fairy.
A. when B. in which C. where D. that
I think A is the best choice but the key answer is D. I don't know why because I think in this situation "when" acts as an relative pronoun to express the period of time "she lived with the fairy" that made her happy.
2. Choose the one that has the most similar meaning with the initial sentence
I don't like anyone to tell me what to do.
A. I don't like being tell what to do.
B. I don't like being told what to do,
C. I don't like to be told what to do.
D. I don't like to tell what to do.
This one, I think both B and C are correct but the key answer is B.
So what is the differences here?
Thank you for your help. I'd highly appreciate that. =)