TL;DR: We don't know for sure, but we can make an educated guess.
The evidence available:
Negan and the Saviors know where Rick's group lives. When Carol met the pickup truck full of Saviors on the road, not only were they already en route to Alexandria, they also revealed that they had been watching Alexandria very closely for some time. Tobin told Rick that Carol left in a car with spikes run through it that he had placed outside the gate the day before. The Saviors in the truck mentioned that they had cars with spikes through them, just like Carol's, outside the gate of Alexandria.
The Hilltop has no ammunition. The Saviors know this. The Saviors had told the Hilltop to bring Gregory's head to their base with the huge satellite dish. If Negan checked out the base after it was attacked by Rick's group, he would have realized a few things:
Whoever attacked the base had brought a head that looked a hell of a lot like Gregory, so whoever did it was in touch with Hilltop and knew what the Saviors wanted from Hilltop.
Whoever attacked the base was heavily armed, had plenty of ammunition, and was far more aggressive and skilled than the people at Hilltop. Clearly, Hilltop had sought help from another group who was based somewhere near Hilltop, but not at the Hilltop.
The same kind of skill and weaponry went into other confrontations with the Saviors: at the slaughterhouse where Carol and Maggie were taken; at the spot where Carol killed the Saviors in the truck; at the railroad tracks where Daryl, Rosita, Abe, and Eugene fought off the much larger group of Saviors led by Dwight; and at the other railroad tracks where Daryl killed three Saviors himself.
Dwight has seen Daryl on three different occasions: in the burned out forest where they first met; at the railroad tracks where Denise was killed; and in the woods where Daryl was captured. Although Daryl was alone and lightly armed on the first occasion, on the two latter occasions he was with other people and well armed.
If the Saviors were spying on Daryl, Denise, and Rosita just before they killed Denise, they might have realized that Denise had medical training (why else would they have brought an untrained, unarmed, mostly helpless person on a supply run to a pharmacy, if not so that she could tell them which medications to take?). They killed Denise, so the Saviors may or may not know that Alexandria no longer has a doctor.
If they had been listening to what was going on in Alexandria as well as watching it, they might have learned that someone in Alexandria needed medical attention and was being taken to the Hilltop.
Taking all of these facts together, Negan would know a number of things:
Rick's people are trained and well armed, but relatively few in number.
They are probably running low on some supplies, which would explain why they made an unprovoked attack on the Saviors on behalf of the Hilltop.
They definitely know about the Hilltop (including the doctor who lives there), but might not know about other communities of survivors in the area.
They have some sort of deal worked out with the Hilltop, and it is pretty easy to figure out the basic idea of that deal: Hilltop has supplies, but lacks firepower, and is being taxed by the Saviors; Alexandria has firepower, but lacks something they need (probably some sort of supplies), and isn't being taxed by the Saviors yet. Thus, the most reasonable assumption would be "Alexandria agreed to get rid of the Saviors in exchange for something that Hilltop has (presumably supplies, possibly other things as well)".
Rick may well believe that he has already fulfilled most or all of his end of the deal - he and his people have, after all, killed at least 43 Saviors, and this was incredibly easy to do. If Rick does indeed believe he has crushed the Saviors, he would probably head to the Hilltop soon for his payment.
Even if Rick doesn't think he's already wiped out the Saviors, he doesn't have many places to go. He's obviously not visiting his grandma in Baltimore, or taking his kids to NYC to see the Statue of Liberty. If he's leaving Alexandria with a fairly sizable crew, he must have a good reason for it, and there aren't that many possible destinations he could have in mind. In fact, as far as Negan knows, Hilltop is the only friendly place Rick knows about at the moment (and this is indeed the case, at least for now).
This all adds up to one thing: If Rick is leaving Alexandria for anything other than a normal supply run, chances are he's headed for the Hilltop.
The Wildcard:
Having read all of the comics to date, I can assure you that this specific question doesn't really come up in the comics. There is no elaborate network of roadblocks designed to herd Rick's people towards a specific place. Instead, Negan just waits on the road between Hilltop and Alexandria and ambushes Rick when his group passes by. This means that there is no reason to believe that there's a mole in Alexandria in the comic books.
However, there is one person in the comics and the show who is clearly not to be trusted...
Gregory, the leader of the Hilltop colony. He is a conniving, sneaky, selfish coward who is only interested in saving his own skin. All it would take to convince Gregory to spill the beans about Alexandria is a simple threat from Negan. "Gregory, if you tell us what you know, we'll let you live and keep being the boss of Hilltop. If you don't tell us what you know, we'll kill you." That's it. That's all Gregory would need to be persuaded to sell out Rick and his community.
...
Granted, Gregory doesn't know exactly when Rick's people will return to the Hilltop, but he does know that Maggie is pregnant and Alexandria doesn't have the neonatal resources that Hilltop has - after all, when she was at the Hilltop, she asked for an ultrasound and some neonatal vitamins. Gregory knows that Maggie will want an occasional checkup from Hilltop's doctor to see how the pregnancy is progressing. In other words, he knows that she'll be back sooner than later.
...
Even if we ignore the Maggie issue, Gregory is aware that Rick's group has another reason to visit Hilltop in the near future: Hilltop owes Rick payment for rescuing a Hilltop resident from the Saviors and beginning the war against the Saviors. Again, Gregory knows that Rick's people will be back to Hilltop sooner than later.