The AI cannot do things like that, unfortunately.
It can set a range of parameters that influence the game's tactical engine when it comes to "how" they will be tasked. The AI also has no concept of "location" built into it - it only recognizes 2 indirect locations - the "centre" of its own town and the centre of the map (used for KOH).
Only triggers will give you that fine degree of control and access to locations.
The AI does have a "task untasked soldiers" command, which will cause any currently untasked soldiers to spread out in the area around the town centre (not the building, but the centre of town) in order to guard it, but you cannot control how far they move - they will certainly move a whole lot more than 2 tiles, for sure.
Phoenix_ER - proud member of the Phoenix Clan