Yes! You can initiate your switch now.
Exit fees (if your contract has any) don’t apply within 6 weeks or 42 days of your contract end date (varies depending on energy provider) so you have the time to choose a new deal and request the switch now.
It always makes sense to keep your options open! It's standard practice for energy providers to roll you on to a more expensive tariff once your fixed contract ends, so make sure to switch tariffs first so this doesn't happen to you!