If you are not familiar with European travel, there are lots of direct flights to secondary airports which are way closer to Pamplona than Madrid is. Seeing that your trip is 6 months out you have plenty of time to lock in a good price.
For example, non-stop flights from Paris Orly to Biarritz...