Yes, Ohakea is big enough for an A340, but it is also New Zealand's only fully operational air force base, and is available to commercial aircraft only in an emergency.
The question is why the CX aircraft didn't have sufficient fuel to continue to Christchurch? Or do airlines routinely nominate operational military fields as their alternatives?