Near-IR observations of NGC 6822: AGB stars, distance, metallicity and structure