In standard English it should be "It doesn't matter". "It don't matter" is substandard, dialect or casual slang, depending on context and point of view. Pop song lyrics frequently include such non-standard or casual grammatical forms.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.