I failed one portion of the AK exam. Do I have to retake both sections

Yes, Alaska requires you to take both sections of the exam even if you passed one portion.