10 9 bytes
-1 byte thanks to @Shaggy
Takes points as an array of three-item arrays and the base point an a single array, in that order. Does not take the size argument.
ñ_ Sort the input array as if each item were mapped through the function... í V Pair the x,y,z in the current item with those in the base point, V a Take the absolute different from each pair m² Square each of the 3 differences x Sum those squares Sorted array is implicitly returned