Depends if it uses weird connectors. Some UPS use normal F terminal connectors and some UPS battery packs like APC occasionally use plastic slide in trays that hold batteries and have goofy proprietary connectors. The batteries inside the sled can be replaced with the normal SLA batteries that are commonly used in UPS units though, just reuse the sled.
Surely it's possible, but what is the advantage of selecting the closest one? Are your bulk file transfers heavily impacted by a few dozens of milliseconds of latency?