It isn’t that simple. In fact, the rail option is about economics, not politics. And there won’t be any pipelines built from North Dakota to northeast refineries.
Did you know that there already exists an oil pipeline on the route of this train (from Montreal to Maine). But it is pumping oil in the other direction.
There has been discussion of reversing it, like was recently done with the Seaway Pipeline from the Texas Coast to Cushing, Oklahoma.
http://www.pmpl.com/current_events.php