It depends. Whether you can get a divorce (called jurisdiction for a divorce) differs with each legal jurisdiction, which have their own laws and criteria that need to be met. Jurisdiction is often regulated by the parties’ domicile or place of residence at the time of a divorce, and timeframes might apply. As such, where you actually got married (or entered into a civil partnership) might have no relevance at all.
However, the ceremony you celebrated, and whether it complied with marriage laws in the jurisdiction where you married (or entered into a civil partnership), is very relevant. See our answer above regarding religious marriages.