Find a company with a data-science department, which needs engineers to industrialize their proof-of-concepts (POCs). The POCs might often include front-end work. Once you are in, learn machine-learning on the side and try to transition into a machine-learning role.
EDIT: On top of it, if software engineering is your strength (testing, automatic deployment, etc), data-scientists will also benefit, since you can show them how to professionally develop a sw product.
I have a friend applying for a job doing just this: being the software developer to help the data science folks operationalize their models.
Not sure how applicable this is to a straight up front end developer, though. I would definitely suggest learning Python if you head this route. R would be good as well.
EDIT: On top of it, if software engineering is your strength (testing, automatic deployment, etc), data-scientists will also benefit, since you can show them how to professionally develop a sw product.