There is no trial if you plead guilty. There is only a sentencing upon a plea or verdict of guilty.
Obviously if the General withdraws his plea then there is no sentencing. If there is sentencing, then the judge would be both convicting and sentencing. Flynn could waive his 6th amendment rights, then that could happen.