More than half the time people come to me with this problem, it's due to lent and other debris jammed in to the charging port.
You can clean it with a tooth pick, q-tip, and 90% or stronger isopropyl alcohol.
If you have cleaned it and still nothing has improved. Then you should replace the dock connector. Here's you part.
https://www.amazon.com/gp/aw/d/B01LWPH50S/ref=mp_s_a_1_1?ie=UTF8&qid=1493644774&sr=8-1&pi=AC_SX236_SY340_QL65&keywords=replacement+charging+port+ipad+air+a1475&dpPl=1&dpID=41xf6bTiXhL&ref=plSrch