This is true. But the XI Corps was fighting a defensive battle at Gettysburg and as they deployed they selected the best ground available for that purpose.
It was the Confederates who were attacking over basically open ground. Therefore it was the XI Corp who had the advantage of terrain, to paraphrase Gen. Buford.