Hi Richard and welcome to the forum!
I suppose it also depends on whether you've been to Paris or Madrid before, and whether you have a desire to spend a day or two in either one of these cities. I personally try and arrive before the starting point to avoid 'spoilers' (I like being surprised by new landscapes), but that's probably just me being sentimental...
The others on this thread have given you the basics, but here's a (hopefully helpful) summary of the details:
If you choose Paris: it's relatively easy to get from Paris to Bayonne, from where you catch the train to Saint Jean Pied de Port. If you want to spend a day or two in Paris, you could opt for the train (
SNCF) to Bayonne. The train departs from Gare Montparnasse, and the faster ones only take 4 hours. If you want to avoid going into Paris city centre, you could fly directly from CDG to Biarritz, either as part of an Air France transfer, or organise your own flight with a company like Easyjet. From Biarritz airport it's only about 20 minutes to Bayonne - otherwise, as mentioned, you could use the
Express Bourricot shuttle directly from Biarritz to SJPP.
Madrid: if you want to spend a bit of time in the city, then the
train to Pamplona is the best option. It only takes 3 hours, as opposed to the bus which takes over 5 hours. However the length of the journey might be a small price to pay if you want to leave directly from the airport.
Alsa has buses to Pamplona that leave directly from Terminal 4. There are about three or four buses per day. Alsa is also responsible for the buses from Pamplona to SJPP. They do the trip three times a day in September (10am, 14:30 and 17:30), and twice in October (14:30 and 17:30) - so just make sure your transport to Pamplona arrives in time to make the connection!