Notify the utility suppliers of your moving out date, send readings of any meters in the property, and request a final bill. You will not then be liable for the cost of utilities supplied after your move out. You can usually do the moving out notifications online.
Utility companies are poorly staffed and sometimes inefficient, so it's not unusual to be chased for payment of amounts that you are not liable to pay. If that happens, remember that it's not for you to prove that you are not liable; it's for the company to prove that you are liable. But keep records of emails, phone calls, screenshots etc to show that you notified the company of your moving out date.
BTW, it's not strange that you have to pay rent if you contracted for a fixed term. If you were able to find a new tenant acceptable to the landlord within the next two months. the landlord might agree to forego claiming rent from you. Otherwise, the landlord is entitled to the rent.
Ms S Byng, barrister, Lincoln's Inn.