I don't mean to state the obvious if you have already tried, but you should be able to open the trunk using the same key that you use for the doors and the ignition. There is a keyhole on the lower right of the trunk lid. If it doesn't want to turn, spray a small amount of lubricant into the keyhole and work the key back and forth a few times. That should loosen up the locking mechanism and allow you to open the trunk with the key. The same thing happened to me a while back and that is how I was able to get in the trunk. The locks tend to freeze up since almost no one uses the key on a regular basis because you can use the interior trunk release, the key fob, or the button on the trunk lid.
Hope this helps. Good luck.
1998 White XJ8