Not a teacher. 'I was told...' is a passive sentence and 'They told me...' is a active sentence. If you want to change 'They told me...' into passive sentence, write 'I was told...'. But if you want to change 'I was told...(by sb)' into active sentence, 'They told me...' is just the answer when somebody=them.
- For Teachers