My Costco GC batteries had the same footprint as a Group 24 but were a little taller. I eventually replaced my battery boxes with 6V ones. If height is an issue with the 12V you have, the 6V batteries might not fit.
6V battery boxes from AmazonA response to a question for these items says that the boxes are "Measurements are approximate as the boxes are on the trailer. With top on 12 1/2" high x 10' wide (top) x 14 1/2 " long, Bottom of box is 7 1/2' x 10 3/4""
As DrewE pointed out, you'll need 2x6V batteries. 2 batteries are a tight squeeze for the tray on my TT tongue, but they do fit.