I've spent this evening going though the OR's and searching vol 19 pt 1 for the term "yards" and noting those which were the range that infantry opened fire. Mark Grimsley has done this before and found 21 useful "definite ranges". I only found 16, but also found several for South Mountain (3) and Harper's Ferry (2) which I didn't include.
The page numbers in the text which include the ranges are; 235, 263, 306, 336, 470, 493. 505, 508, 509, 865, 872, 887, 905, 931 and 1037. In three cases a small distribution was given (I assumed the centre in each case), and in five cases it was indicated by the word "within" that the range was slightly shorter (I ignored this and stuck with the number).
The average range of the 16 samples for opening fire was 84 yards (all numbers to be rounded to the nearest whole number.
However, one sample is out of kilter. On page 263 it is stated that the 26th NY opened fire at 350 yards, expended all their ammunition and then withdrew. An examination of their situation indicated they were firing at Ripley's brigade more than 450 yards away. The brigade commander makes no mention of this fire, and we can assume it had absolutely no effect. Removing this figure reduces the average range of opening fire to 64 yards.
Two of the remaining statements indicate 100 yards, the rest are lower, all of the remainder are between 50 and 80 yards.
I found several other incidents involving range worth reading. On page 867 the (Federal) enemy has cleared a 40 yard killing area in front of breastworks, which was judged to be too strong to charge. On page 925 artillery unlimbers at 150 yards from the enemy, but starts to suffer from "sharpshooters". There are a few indicative ranges elsewhere but nothing definite.
This result is much shorter than I expected.