The court appearance was Khalil’s first before a judge since Homeland Security agents took him into custody at his university-owned apartment on March 8.