Another aspect is that it would have to be Co-Ax cable of the same, matching, Impedance as the aerial.
Given also the unusually small size of the connectors associated with WiFi Aerials, it seems likely that suitable Co-Ax cable will be very small in diameter and thus physically weak and needing protection, such as conduit.
Given the restricted Low Power of WiFi systems and that generally such cables are normally only found within the Router so very short, I suspect that the losses over that 20 Metre distance may be excessive.
Trying to use the WiFi directly as a radio transmission, would be subject to both permanent losses such as through walls; and annual ones such as leaf growth; and temporary ones such as persons and animals passing through and absorbing the beam - also rain and humidity.
Additionally if any of the walls are recent, they are likely to have "vapour-barrier" metal screening incorporated.
Again particularly if the garden building is recent, it is likely to have RCB type Mains protection, which tends to block attempts to use the mains wiring.
So as others have recommended, I think that you should use an Ethernet cable.