1) Make a brush where you don't want the sentry to be built.
2) Make sure the brush touches the ground completely or even goes through it a little bit or sticks out over the edge if it's on a ledge.
3) Also make the brush at least 64-96 units high, so nothing fancy can be done to get it build above the ground either.
4) Once you have the brush(s) in place press ctrl+t and select func_nobuild from the drop down(make sure you hit enter so it actually selects it)
5) Once that it finished go to the texture palette and make it the trigger texture(just type in toolstrigger) into the Filter and it'll be the orange one there.
6) After that, an engineer can't build where you put that brush.
Note: If you only want a certain team to be able to build there you can make the brush team specific in the Tie To Entity(ctrl+t) menu in the drop down.