I’m no expert on DC firearm law. But the reference I found implied that what ammo you could possess was linked to the DC gun permit you had. The reference said 21 as if it were for all firearms, but maybe I misread it, or the discussion was incomplete.
Yep... You are right on track on..
“There are certain classes of people who are permitted to possess ammunition in DC. A person in DC who wants to buy a firearm must first get a registration for that firearm. Once they have a registration for the firearm, they are allowed to purchase or be in possession of ammunition, but only ammunition of the same gauge and caliber as their registered firearm. For example, a person with a valid registration for a 12 gauge shotgun cannot be in possession of or purchase nine-millimeter ammunition that goes to a pistol. The type of ammunition someone purchases must correspond to the firearm that is registered in DC to that person.”
https://washingtondccriminallawyer.net/dc-gun-lawyer/ammunition/laws/