PRT results is a small percentage, GPA is big, i think like 40%, FITREPs from your superiors throughout the year is also big. I think those are the three things but I'm probably missing one.
What you read was likely in regard to Service Assignment. I believe you're probably referring to the kid who, after being assigned SWO, was ranked #1 for ship selection and then picked the Zumwalt. Ship selection rankings are based on GPA, aptitude score, CO input, etc. Other than Service Assignment/ship selection, midshipmen aren't really "ranked" against each other among all the units.