Normally I would subscribe to the all the same age theory but sometimes budgets have a way of inserting themselves, like it or not.
I have seen perfectly ok batteries like Gels get a bulge and there is nothing wrong. If you do research even the LiFePO4 do that. With the very thin and light weight cases they will do that sometimes.
Load test them. Whether you get a tester with a guy attached or do as Twisted Tree suggests, which is a good way to do it, I would not just willy nilly replace all.
If the bank is old you may only get another year or so out of even the new ones as the others will have an effect . The house service will be harder on them than engine only use. On the other hand if the bank is relatively new the life may be quite good, At least enough for you to look around. It is a chance but it can work out.
I have two Gel 8d batteries for the engine only which have about 6 years between them. Both had seen house service before being relegated to the engine so they saw some use. They both are doing fine, voltages are the same. One is now pushing 20 yrs the other about 14. I keep track and mark the purchase dates on them.
I will say though that if you go that route keep watch and if any more trouble with batteries dieing show up then you may have to bite the battery.
Read the link below and check how your batteries are connected. It does make a difference to the life. I'l guess the troublesome ones are like
figure 1.
SmartGauge Electronics - Interconnecting multiple batteries to form one larger bank
Figure 2 will a better connection.
Figure 3 even better. There is a catch here though that the supply wire to the buss bars should be the same type and the positives the same length and the negatives the same length. Note the pos. and neg. sides can be different lengths. It's just a bit more work. DOn't rewire the boat for #3 though, at least not yet, but if you have #1 then change that to #2 at least. It will help. And be sure all connections and wiring are in good condition and clean and tight.