Good reasoning! I'll make it clear that there's no chance for any anomaly occur, what is presented is how the situation will play out with no chance of divergence. Considering your answer then and out of the context of this thought experiment, would you say there is a moral difference between killing someone and letting them die? An example for this could be is there a difference between: A) A doctor letting someone who is terminally ill die rather prolong their lives agains their wishes and B) The doctor euthanising them to an easily painless death if asked? One is killing and the other is letting die. One is letting die, the other is killing.
I don't see the analogy here as being apt. Immediate death is coming to either one of two sets of people, regardless of what Gregg does. In the case of the doctor, death at some point is coming to the patient. You can ease suffering by making that death come sooner. This is a completely different scenario. As the Buddhists say, "life is suffering," and to be born is essentially a death sentence, therefore the question of euthanasia is one of degrees. At what point is the potential for tremendous suffering great enough to warrant assisted suicide? Who determines what level that suffering is? Lot's of subjectivity in there. Not a lot of subjectivity in a train hurling towards one of two groups of people.