Give the top null the name “Start Null” and the bottom one the name “End Null” and use the following for the in-between layer positions:
tart_layer = thisComp.layer("Start Null");
end_layer = thisComp.layer("End Null");
pos_start = start_layer.transform.position;
pos_end = end_layer.transform.position;
index_start = start_layer.index;
index_end = end_layer.index;
layer_count = index_end - index_start;
this_layer_pos = pos_start + (pos_end-pos_start)/layer_count*(index-index_start)
This will work for any number of layers as long as the start layer and end layer stay at the top and bottom of the nulls stack and there are no other intervening layers.