I am afraid that the requirement to vote in a UK general election is that you must be a British citizen. This situation is not unique to the UK: many countries only allow their citizens to vote at general elections, and linking citizenship to the right to vote is not unusual. The UK additionally allows qualifying Commonwealth voters and Irish citizens, resident in this country, to vote at general elections. This position reflects the historical ties between the UK and Commonwealth countries, and the historical ties and reciprocal arrangements between the UK and the Republic of Ireland.
Currently, EU citizens resident in the UK can vote at elections to local authorities, devolved legislatures and the European Parliament, but you would need to apply for British citizenship to be eligible to vote in general elections. Information on how to become a British citizen can be found here: https://www.gov.uk/becoming-a-british-citizen.
However, I am glad that the government is supporting more rights for those who no longer live in the UK but retain British citizenship scrapping the rule that bars British citizens who have lived abroad for more than 15 years from voting. The Government is supporting the Overseas Electors Bill, introduced as a Private Members' Bill by Glyn Davies MP, which is currently in Parliament and which would remove this rule, and I believe it deserves cross-party support.