node sort not work in ascending or descending why?
Revit Elements are not comparible - you have to pull something from them to sort by. Try wiring the GetParameterValueByName node into the Level.Name node, and then use that as a key for a List.SortByKey node, prior to using a GroupByKey node.
Clean or replace your null values. Garbage in results in garbage out.
Set your list lacing and levels to work with the correct data sets.