pKa values for protonated nitrogens in ketoconazole
The 6.4 pKa is close to the reported pKa of imidazole (6.95), so 6.4 is at the imidazole ring.

That leaves pKa 2.3 (or 3.64) for the other basic nitrogen. While that nitrogen is part of a piperazine, piperazine itself (pKa 9.8) isn't a good comparison. The nitrogen in question is also conjugated to an aromatic ring, so it would be better to look at aniline, with a pKa of 4.6. That's much closer to ketoconazole. Add in the inductive effect of the proximal amide, and a pKa in the 2-3 range makes sense.



Many common pKa's can be found on Prof. Dave Evans's pKa list.