A private school has announced it will close at the end of its summer term as it is "not financially viable" to remain open.