It's probably not HPV, but you should get it checked to make sure.
There is something called penile melanosis. It's basically a hyperpigmentation, and occurs when melanin forms deposits on the surface layer of the skin. It's benign, so you don't need to worry about cancer.
https://www.healthline.com/health/penile-melanosis#symptoms
https://www.medicalnewstoday.com/articles/327189.php
https://www.epainassist.com/men/penile-melanosis - this has an illustration of it, which is the best I could find (which is ridiculous).
You should definitely get it checked by your doctor, though, to make sure it isn't melanoma or another cancerous condition, or something like lichen sclerosus.
Let us know what happens. :)