"The teacher told us not to swim in the river."
Translation:El maestro nos dijo que no nademos en el río.
'La maestra nos dijo de no nadar en el río'
This sort of sounds like a very word by word translation and it feels completely wrong (I'm a native speaker). It sounds like she is telling about what it is to not swim in the river (the action being the topic of the conversation, and not an order!).
I'm not sure if Duo would accept this, but a much better option would be:
'La maestra nos dijo que no nademos (or nadáramos) en el río'
Now, to your sentence.
"La maestra nos dijo que no se nadan en el rio"
This is not correct, but it could be if it were
"La maestra nos dijo que no se nada en el río"
And this would translate into somethign like "The teacher told us that it is not swum in the river". But this requires a very specific context in which the teacher is just telling them that people don't (usually) swim in that river.
Note that you did not include the first person plural in your sentence, and you should have.
I hope this helps a bit :S
Thanks for the explanation! (note: you accidentally posted at the top level instead of using "reply")
"La maestra nos dijo que no se nadan en el rio" was not accepted. Not sure if it's wrong or not.
I don't understand why duo wants 'de' here and not 'que'.
I tried "El maestro nos dijo que no nadar en el rio" and was dinged.
You can use "que", however, if you do that, the you MUST use the subjective. Using the subjunctive, the sentence becomes: "el maestro nos dijo que no nademos en el río". Using the "de" instead of "que" allows you to use in infinitive "nadar" instead of changing it to the subjunctive, but I don't think that saying it that way is normal...