Yes, in many cases, you can switch from a temporary visa to a settlement route while remaining in the UK.