I suspect the striker pin on the bottom of the tailgate opening has moved and now the boot catch cannot engage on it properly by the sounds of it, loosen the bolts and move it further upwards and retry. There is also a rubber buffer in each corner of the tailgate, if these are wound out too far the boot wont be able to close enough to cathc the striker. If that doesnt sort it or the boot catch keeps sticking shut then you'll need to take it out of the tailgate and service it!
Pull the plastic trim off inside the boot, you'll see a metal rod linking the button to the boot catch. It sounds liek somehow this is sticking or the boot catch itself is jamming up internally? its easy to strip it all off, theres 2 big allen bolts holdign the catch to tailgate, so remove that 1st and unclip the rod from the inside of the catch. Now work the mechanism to see if its sticking, if the spring is good & strong and springs open nice when you release it all is well here, conventrate on the boot lock.
The lock pops out from behind, there are 2 clips that you release and it'll come out. If you have central locking its a bit mroe tricky as it has the massive long bar to the cl actuator, but if you unscrew the actuator from the boot you can release it from the rod. The rod will then come out, it'll take a bit of persuation and wiggling but it will come out in 1 piece!
Next check the lock mech, put the key in and spin it, you should see the lock mech spin and the metal mech on the rear of the lock moving round. If the key doesnt move it or is jammed remove the screw from the back and withdraw the lock barrel. Drown the lock barrel in penatrating oil til all the pins move freely, clean out the button hole it came out of and re-assemble.
Refit it all to the car and hopefully it should now work!