The near field is regions of the electromagnetic field (EM) around an object, such as a transmitting antenna, or the result of radiation scattering off an object. Non-radiative 'near-field' behaviors dominate close to the antenna or scattering object.
For more details and information about this subject i suggest you to see links and attached files on topic.
Directivity is not defined in the near-field. It is a measure of the performance of an antenna in the far-field. Instead you have to work out near-field coupling between two antennas.
There is a region between near-field and far-field where far-field directivity can be used with derating factors based on the size of the antennas and the range.
There is a chapter in The Antenna Engineering Handbook, and others, giving directivity reduction based on the phase error across the aperture, caused by the wave reaching or leaving it being curved not plane.