It might sound stupid but replacing bad habit with other less bad habits works faster and slowly you can turn it into a good habit in a more consistent way than just outright trying to replace it with a good more healthy habit.
At least for me personally that works best, whenever I try to remove or replace a bad habit with a healthy one and go cold turkey it usually just doesn't last more than a day or two and I just end up back on the train of bad habits, in your particular case with junk foods you could start eating less and less junk food and replacing some of them with healthy ones here and there and gradually work your way up to a fully or mostly healthy diet.