Academy to take over school at risk of closure