
I have a rescue collie who is a car chaser and is work in progress. When he first came to me I daren't walk him anywhere near a road as he would lunge at the cars - the first time he did it he was double leaded and on a harness but it was a very scary experience.
I walked him in areas that were nowhere near roads at all - he wasn't used to walking on a lead and I had to tackle that problem first. Once he was able to walk fairly nicely on a lead I had to start addressing the problem. I taught him a "watch me" command and armed with pocketfuls of treats I found a quiet road where I could stand 50 odd feet away and when a car started to approach us I got his attention with a treat and used the watch me command. As the car was at a good distance he did watch me and then when he turned his head to look at the car I used the watch me command again and rewarded him turning his head away from the car and back to me. It took weeks for him to hear a car and choose to look at me rather than the car - and I still did this from the same 50 feet distance. Over many months I was able to gradually move closer to the road and keep him within his comfort zone.
Once he was able to ignore passing cars from a distance of about 15 feet I moved to a busier road but at a much greater distance and began the process all over again - we didn't walk next to it just sat. When he was comfortable with this I then started to take him in the evening to a local small industrial estate - being the evening there was little traffic and most of it was moving fairly slowly - and I introduced walking with him alongside the traffic but still at a distance from it and rewarding every time he turned his head from watching an approaching vehicle to watching me. I made sure that we were always facing the approaching traffic so he could see it coming towards him as it was on his side of the road - traffic approaching from behind us and on the same side of the road as us was too much of a temptation. Chasing traffic is self rewarding - "the car disappears when chased".
I have now reached the stage with him where he can walk beside a busy road as long as there is at least 4--5 feet between him and the traffic. If it is wet and the car tyres are making a swooshing sound he still finds it hard to ignore the traffic but I am far less restricted as to where I can walk him now but would never, ever let him off lead anywhere where there is moving traffic within his eyesight because the thrill of the chase would probably be too much for him to resist and apart from the danger it would also put all his training back to square one.
It is a long, slow process - I have had him for three years this month. He was a farm dog who lived in a very rural area and spent the first year of his life on a chain so he had no socialisation at all and to relieve the boredom he would chase anything that moved. He is very toy orientated but I can't use a toy for a reward with the traffic training as it makes him excited and I am teaching him to be calm so need a reward that he values highly but that doesn't raise his excitement levels.
I have also taught him to walk on either side of me so I can always put myself between him and the traffic.
It takes a lot of patience and time but your dog is young so you have youth on his side and he hasn't been indulging in the habit for a long time - don't put him in a position that takes him over his threshold, stay patient and be consistent. If you start to progress to being closer to the traffic and he can't cope with it take a step back and go back to a distance that he is comfortable with and slow the process down a bit.
Wishing you luck with it - walking a traffic reactive dog can be very stressful.