It's difficult to tell what exactly the problem is, so I'll give a general explanation of the new 1.13 selectors. The best way to explain yourself in the future is to include an example of what you tried, explain what the example does wrong, then explain what you want it to do.
In 1.12, selectors had a lot of "paired" options, such as radius max (
r=) and radius min (
rm=) or XP max (
l=) and XP min (
lm=). These options could be used together to form a specific range, or independently as minimums and maximums.
In 1.13, these "paired" selectors have been replaced with a version of ellipsis (
..). They're used in the mathematical sense, to describe a continuation of a pattern, in Minecraft's case a range of numbers such as
3..6 to say 3, 4, 5, and 6 (along with everything in between). They can also be used independently to form minimums and maximums like in 1.12. To use your use case as an example,
gamemode 2 @a[distance=..10] will change the gamemode of all players within ten blocks (
..10) to adventure.
In order to make a proper boundary, you would also want to set players to a different gamemode when they are outside of the barrier. In this case, we'd want 10 as the minimum and some other somewhat-arbitrary number as a maximum. I would use
gamemode 0 @a[distance=10..14]
(PS, to avoid spam in the players' chat, add a gamemode restriction to the above commands.
gamemode 2 @a[gamemode=survival,distance=..10])