Hannibal didn't march on Rome for two main reasons.
The city of Rome was extremely large and had large stores of food—at this point in time the main strategy of gaining victory of a large city was starving out. Hannibal probably knew that this wasn't possible considering his army was isolated and had a low chance of success against a city that had over 200,000 people when Hannibal's army was around 40,000.
Hannibal had actually tried to get to Rome, but could not get past the Roman fort of Cassino that was south of Rome. A failed siege forced Hannibal to make camp for the Winter in 216. Following this point Hannibal faced an attritional war against the Romans. He had success in battles in 212, killing two consuls, but his campaign began losing traction at this point because he could not get the proper supplies he needed. Keep in mind that Carthage was an oligarchy and it was difficult to get the full support that was needed to fight the up and coming war machine of Rome.
Daly, Gregory. Cannae: The Experience of Battle in the Second Punic War. Psychology Press, 2003.
The largest issue, as stated above, was siege equipment he simply didn't have, food for his army, and funds to pay them. One issue Carthage repeatedly had was paying their armies, after the First Punic War they couldn't pay and had to put down a rebellion. So for fifteen years, Hannibal was paying his army in loot and promises. Also, there was a strong peace party back home that was denying Hannibal support. So the best he could hope for was to kill enough armies and hope Rome gave up eventually, which as Rome would go on to show, they never give up.