Darkness cast either on person or a point in space is dispellable by dispel magic. The darkness itself is a magical effect.
It says so in the spell itself:
Choose any creature, object, or magical effect within range. Any spell of 3rd level or lower on the target ends. For each spell of 4th level or higher on the target, make an ability check using your spellcasting ability. The DC equals 10 + the spell’s level. On a successful check, the spell ends.
The target here is any of the following:
- Magical Effect
In this case, the target would be that nebulous last one. You can see the edge of the magical darkness from outside it, and if you're inside it, it is all you can see. So you have line of sight to target it. Thus targeting it isn't an issue. In this case, you are targeting the darkness effect directly, and not the person/object it is cast on.
And fits with darkness dispelling lower-level light spells:
If any of this spell’s area overlaps with an area of light created by a spell of 2nd level or lower, the spell that created the light is dispelled.
Dispel magic works on area effects that aren't instantaneous. Instantaneous spells must be countered rather than dispelled.