It's impossible to earn a Doctorate of Nursing Practice (DNP) straight out of high school. The DNP requires a prior bachelor's degree in nursing (BSN) as a prerequisite. Therefore, you first need to complete a BSN program (typically 4 years), then a DNP program (typically 2-3 years, sometimes longer depending on the program and prior Master's-level education).
So the minimum time commitment would be 7-8 years after high school, and possibly longer.