I'm having the same issue trying to find a replacement part, no luck so far.
To make mine work I just took some stripped copper speaker wire, coiled it up and used that to both secure the batteries and provide the appropriate contact to make it work.
Additionally I have heard someone using a 5/8" bolt:
''Go to Your favorite hardware store's, Hardware Section, your looking for their 2" long, 5/8" thick Hex Screws probably at the bottom with other larger screws. should cost $1. 9/16" is the technical width of the apple battery cap, great size choice apple, but 5/8" screw works for my solution.
Tinfoil about 1"x3" wide strip fold up enough so it will fit inside battery compartment.
Put in the 3 batteries flat side up, put the piece of tinfoil on the last battery, screw in the hex screw till its snug, press power, you have a working bluetooth keyboard. (Looks frankensteinesque) So if you have a metal saw, you could trim it down a bit and make your own more ergonomic caps.
Until I get a metal saw, Im working with this: (see picture)