Time-optimal neural feedback control of nilpotent systems as a binary classification problem