How did Aragorn’s army reach Mordor so easily, whereas Frodo took 17 months to reach Mordor with so many difficulties?
Frodo didn't take 17 months
He left Hobbiton on 22nd September 3018 and arrived in Mordor on 19th March 3019 - about 6 months.
They travelled different distances
Frodo travelled all the way from Hobbiton whereas Aragorn's army travelled from Minas Tirith, which was substantially closer.
By comparison, it takes Frodo from 5th March to 12th March to travel from the Black Gate to Shelob's Lair, which is only 7 days for a similar distance to that which Aragorn's army travelled. Aragorn's army makes the journey from 18th March to 25th March - also 7 days.
Frodo stopped plenty of times along the way
- Rivendell: 2 months.
- Lorien: 1 month.
Which reduces his journey time to 3 months.
In fact, if we look at the time from the Breaking of the Fellowship (26th February) to the destruction of the Ring (25th March) - before which Frodo and Aragorn were travelling together - we see that only 1 month passes.
So from that point onwards we can say that it actually took each the same amount of time to travel to Mordor, accepting that they went to different parts of Mordor, and with various delays and sidetracks along the way, from the time their routes diverged.
Source for all dates and times: Tale of Years, Return of the King.
Victim of Circumstance explains the basic duration.
As for "easily", Sauron could absolutely have fought them all the way along their route. But why would he? All his enemies are stupidly marching into a dead-end trap where they're ludicrously outnumbered and can easily be wiped out to the last man in one simple battle with nowhere to run to. From Sauron's POV, Aragorn's strategy could only be absolute desperation, and there's no way he could possibly win. The last thing Sauron would want to do is dissuade his enemies from making that mistake.