The iPads jack input/output can be used to record a signal but you’ll need to connect to the pad with a TRRS cable. This is how the mics that plug directly to your headphone socket work. You may also need a special cable to have a line level signal to work but I haven’t tried this myself. Check out this blog post.
I assume you are using some kind of usb mic with a headphone output? In this case I would instead connect the mic directly to the iPad with a camera connector kit or usb c if it’s a newer iPad. If you must use the headphone output, you will need a trs- trrs cable such as a Rode SC7 but this may not work as intended with the signal levels from the headphone out jack of your mic.