Magic jar has a duration of "Until dispelled", but dispel magic targets…
one object, creature, or magic effect within range
Magic jar involves multiple things (a container, yourself, a creature, both souls) but it's unclear to me what the spell is technically "on" (emphasis below is mine)
Any spell of 3rd level or lower on the target ends
What exactly do you have to target to dispel magic jar with dispel magic?
Best Answer
Cast Dispel on the Target of the Magic Jar
The target of magic jar is always in the jar or possessing a body. Wherever that is should be the target for dispel magic.
In the description of the spell, the target of the spell is referred to as "you". Wherever that "you" is, is where the target of magic jar is, and should be the target of dispel magic.
Initially in the Container
The "you" is in the container.
Possessing a Host Body
The "you" is in the host body.