Just realized that you were providing that input to Wolfram|Alpha, not Wolfram Language. I don't know how to sort and convert units in Wolfram|Alpha. Copy the Wolfram Language input from Wolfram|Alpha and wrap it in Hold.
entities = 
  Hold[{Entity["Star", "RigelKentaurusA"][EntityProperty["Star", "DistanceFromEarth"]], 
    Entity["Galaxy", "M31"][EntityProperty["Galaxy", "DistanceFromEarth"]], 
    EntityClass["Galaxy", "ARP244"][EntityProperty["Galaxy", "DistanceFromEarth"]], 
    Entity["StarCluster", "NGC6611"][EntityProperty["StarCluster", "DistanceFromEarth"]], 
    Entity["Planet", "Jupiter"][EntityProperty["Planet", "DistanceFromEarth"]], 
    Entity["PlanetaryMoon", "Moon"][EntityProperty["PlanetaryMoon", "DistanceFromEarth"]], 
    Entity["Nebula", "M42"][EntityProperty["Nebula", "DistanceFromEarth"]], 
    Entity["StarCluster", "M45"][EntityProperty["StarCluster", "DistanceFromEarth"]], 
    Entity["MinorPlanet", "Pluto"][EntityProperty["MinorPlanet", "DistanceFromEarth"]], 
    Entity["Nebula", "M57"][EntityProperty["Nebula", "DistanceFromEarth"]], 
    Entity["Galaxy", "M104"][EntityProperty["Galaxy", "DistanceFromEarth"]], 
    Entity["Star", "Sun"][EntityProperty["Star", "DistanceFromEarth"]]}];
names = entities /. (Entity | EntityClass)[_, e_][___] :> e // ReleaseHold
distances = entities // ReleaseHold // Flatten // DeleteMissing
sorted = AssociationThread[names, distances] // Sort
Convert to whatever distance unit you want e.g.
sorted // UnitConvert[#, "LightYears"] &