It's easy walking distance but you'd need to meet NZ entry requirements and enter NZ. I'm not sure if there will be anything on your ticket preventing this with the fact you're connecting flight won't be paying any NZ customs charges for arriving customers.
All of this is assuming the gym has casual entry!