Hi,
ok, so maybe I am not understandsing what you want.
this action assumes that you define a number of GameObjects in an arrayList so that they can be sorted by distance, but you seem to expect that it search within the hieararchy and store directly objects ? correct?
for this I would use ArrayListFindGameObjectsByTag ( and all your ennemies woudl be tagged "Ennemy"), and then you'll have your arrayList populated.
but really, since they are ennemies, you'll have do to a lot of house keeping, everytime an ennemy is created or deleted. so I would suggest that ennemies add themselves to this array AND remove themselved when killed.
Bye,
Jean