The former; 'I wish I were there'. An alternative here could be 'I wish I was there'. Using the subjunctive 'were' rather than 'was' seems to express a sense of impossibility, whereas 'was' leaves more room for a possibility. In formal contexts, the usage of 'were' appears more often. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.