That would be true if the situation you're describing was the case; but it is not. Unless you're suggesting that the gay couples are currently forming straight 'faux' marriages to get pension rights? (And I know you're not).
We already have the pairs set up; we're just only giving rights to some of them. Suppose it's something like this among your 40 people:
16 man/women.
1 man/man.
1 woman/woman.
The rest are single.
The man/woman pairs cost extra because of the right to inherit the pension income - as compared to the man/man, woman/woman and singles. If you extend the right to inherit the pension to man/man and woman/woman then it will cost more for that extra 12.5% that have gained an additional right.
Although, in practice, man/man couples would cost less than either man/woman or woman/woman.
Quite frankly however, I think it's about as bollocks an argument as arguing that we shouldn't aim for pay equality between men and women because it would cost more. Just a technical quibble.