Jennifer Lopez and Ben Affleck are heading for a multimillion-dollar “exercise in closure” — all because they couldn’t stop wondering about the “unfinished business” of their past, according to sources.

“They got caught up in the moment. Jennifer had wanted this wedding — the gowns, the friends, all the trappings and trimmings — for decades,” one friend told Page Six.

After calling off their first engagement in 2004, the two apparently always wondered “what if,” leading to a rekindled romance and wedding in 2022. The three-day affair at Affleck’s $8 million estate in Georgia was a blow-out, with Lopez wearing not one but three gowns by Ralph Lauren.

Now, sources told Page Six, the couple is expected to announce their marriage is officially over by the end of the summer.

Jennifer Lopez and Ben Affleck kissing at wedding, with fireworks in the background

Nostalgia got the best of Jennifer Lopez and Ben Affleck, who wanted a big wedding extravaganza after losing out on their first one, sources tell Page Six.jlo/Instagram

Ben Affleck and Jennifer Lopez on their wedding day.

Lopez and Affleck first tied the knot at the Little White Chapel in Las Vegas on July 17, 2022.jlo/Instagram

Sources said the couple had never gotten over the “what if” factor of their failed romance from 20 years ago. Here, Affleck and Lopez are at the “Gigli” premiere in 2003 — the same year they postponed their first engagement, before breaking up.