Translation:I use the train.
There's a difference alright. I "use the train to study," or to sleep or something. I "take the train to the airport," or "I take the train home."
In defense of Duolingo, I may "use the train to commute." But if I "use the train to work," expect me to open up the laptop as I ride and work on the train.
Since "I go by train" includes "go" the Japanese equivalent would probably include "iki." Like, that would maybe be "densha to ni iki masu." I mean, "densha ni/de iki masu" would imply your destination is the train, so maybe using "to" to indicate that you're going "with" the train...