I'm not sure that there's a direct line to SJPdP. I've only ever gone to Burgos and Leon from Madrid Airport.. Try the ALSA website. They might be able to give you information on connections. When going to SJPdP I've only flown into Biarritz..
Buen Camino!!