The 20-year-old captained the Swansea Under-23s side who won the Premier League 2 title last season and reached the EFL Trophy quarter-finals before losing to eventual winners Coventry.
He is the second new defender brought in by Glovers boss Darren Way, who has made seven summer signings in total.
"I'm excited to have the opportunity to work with Keston," said Way.
"He's the latest in a long line of players to be entrusted to us from Swansea. I'd like to thank (Swansea chairman) Huw Jenkins and everyone else at the club for their help in completing the move."