On graphs with near minimal distance energy