I don't think they would've made it anyway (spoilers)
That was seemingly a pretty long tunnel, they weren't walking that fast, and the train came up very soon after they stopped progressing forward. If the greasers hadn't shown up and the boys continued walking, they'd be somewhere in that tunnel, toward the far end when the train came. Maybe they could plaster themselves to the tunnel walls, but they probably wouldn't have enough time. I propose that the greasers' arrival and ensuing chaos saved Jim's life.
It is possible, however, the tunnel was shot with a wide angle lens, creating more depth of field, with the express purpose of making whatever tunnel they were working with seem perilously long. This makes determining the length of the tunnel and possible outcomes solely based on the film basically impossible.
If the actual tunnel from the original shooting location could be verified, then we'd be in business.