And yet choses not to? Israel is a lot closer than London, as are multiple other targets with strong connections to the USA.
Iran fired one missile with an apparent range of 4,000km on to Diego Garcia. In theory, London is within 4,000km of the northwestern corner of Iran. But Diego Garcia is to the east of Iran, so gets a tailwind from the Earth's spin. London is to the West, and so would have the Earth's spin work against it. Also, Iran does not have complete control over the northwestern corner of Iran, nor the infrastructure to get a large missile up there.