(29:9) You are standing today, all of you, before God, your Lord, the heads of your tribes, your elders, and your officers— all the men of Israel.
the heads of your tribes, your elders “Elders” refers to Torah scholars; “heads of tribes” refers to communal leaders who are not necessarily Torah scholars.
Moses placed “heads” before “elders, ” whereas “[Joshua] summoned the elders of Israel, their heads, and their officers” (Joshua 24:1), placing “elders” before “heads.” The reason Moses placed heads before elders is that both the heads and the elders were his disciples, so that they were each other's colleagues. That's why the elders did not feel slighted being placed after the heads. By contrast, in the case of Joshua, the heads and the elders were not all his disciples; that's why Joshua placed the elders, who were greater scholars, before the heads of the tribes.
Another reason: Moses did not need the elders for the conquest of the land, because he was to die before entering the Land of Israel. Therefore, he placed the heads before the elders. But Joshua needed the elders' support for the conquest; that's why he placed them before the heads of the tribes.