They're all grammatical.
You could say
In those days, I was taking the train to work every day.
In those days, I took the train to work every day.
In those days, I would take the train to work every day.
The first, was taking, puts emphasis on the action as recurrent action, corroborating or reinforcing the meaning supplied by in those days and every day.
The second, took, relies
solely primarily upon those temporal phrases for that meaning. (The simple present and simple past can refer to customary behavior.)
The third, would take, also corroborates and reinforces the idea of recurrent action, my then customary behavior.
The subtle difference between was taking and would take is that the continuous refers to the action as repeated or recurrent action, whereas would take refers to the single action as emblematic or representative of the customary behavior.