And presumably lived to tell the tale? Attempting to solder batteries like this together cause them to explode if you get them hot enough to melt solder.
Sorry I don’t know any alternative to separate battery holders.
3D print enclosure to fit and some spring as with other battery holders?
Or get some other nearly fitting enclosure.
If lucky you can get one from a toy.