Try reframing these noises in a positive light. You might say something like: "I've noticed that you are very good at making loud train and fire-truck noises. Can you make other noises, too? Can you make the noises soft or can you only make them loud?" This is the kind of subtle challenge that kids really like. Then say, "I wonder if you could save those wonderful sounds and use them when I read to you. When I'm reading a story about a train (maybe The Little Engine That Could or the Thomas the Train series), I'll give you a special look and then you can make the sound." By treating his desire to make these sounds as something positive and thinking of creative ways to allow him to use this "talent," you change the "dance and rhythm" of how and why he makes these sounds.
You might also ask him to save his train sounds for when he's playing trains and for when you want everyone to come to the supper table...he could "call" the family with that sound. I also suggest that you engage him in discussions and creative play that involve trains and fire trucks and any other things that he might attach sounds to.
Try to discover why he uses these sounds when he does, but don't be worried if there is no particular pattern. And celebrate his talent for making these sounds as you explore ways that he can use them in a positive, valued manner.