AdaDetectGPT: Adaptive Detection of LLM-Generated Text with Statistical Guarantees