No, Building destroyers can't destroy something they can't reach. That's called a
moat, and medieval civilizations the whole world over figured out the utility of building a big ditch around their valuables. (Later they filled the ditch with water to prevent people from just digging under the walls.)
It works handily in DF, too.
If you want a raisable portcullis that creatures cannot walk through, but your defenders can shoot through, and building destroyers cannot get to, and that you can turn into a wall in an emergency involving creatures that shoot back, here's how you do it:
Assume the entry is the south.
Code: = = wall
# = Wall Grate or Vertical Bars (either/or, they're effectively the same as of the current version)
L = Lever
D = Drawbridge (Raises to the north)
B = the anchor-point of the drawbridge - this becomes a wall when the bridge is raised
R = Retracting bridge
_ = Channel/ditch/moat filled with whatever you can fill it with.
Spaces are any old flooring
======
=
=
LLL=
==========#####===========
==========BBBBB===========
__________DDDDD____________
__________RRRRR_____________
__________RRRRR_____________
__________RRRRR_____________
Now, I'll explain the reasoning behind all of this:
Three levers. One of them (Use whatever system to keep track of levers you want to, just make sure you know which one does what) is hooked up to ALL of the Grates/Bars. Another is hooked up to the Drawbridge, and the last is hooked up to the Retracting Bridge.
When down, the grates can be shot through, but cannot be passed through - these are your portcullis.
The Drawbridge is only two squares wide - it's only real purpose is to turn into a wall, but as a secondary function, if anything does get to that part of the bridge, you can Atomsmash them with it. The drawbridge effectively forms the "huge doors" part of the portcullis and doors bisuness you see on classic castles.
The retracting bridge is native to Dwarf Fortress. When you pull it, the bridge vanishes, and anything that was on it falls into the ditch, whereupon they mill about until your marskdwarves get around to shooting them, the ditch filled with spike traps, whereupon you PULL THE LEVER (not shown) for HAPPY FUN TIMES, the moat of water, in which case they drown, or the moat of lava, for EPIC HAPPY FUN TIMES.
Now, you may notice that the levers have been seperated from the gate entirely. This is for a reason - this is because civilians, not soldiers, pull the levers. The last thing you want is your civilian darting out to pull the gate, getting scared because the Enemy is a screen and a half away and charging at your gates, and instead of LOCKING THEM OUT, runs and hides like a pussy. Ideally, the gatehouse is entirely seperate from the courtyard, so your civilians never ever risk seeing the Enemy. Obviously, your trade Depot is to the north, inside the courtyard. (Whether it's indoors or out is immaterial.)
So, you have three options here. You can lower the portcullis, and the enemy can run right up to the gates (whereupon you can Atomsmash them or shoot them, or drop them into the moat at your pleasure.) You can seal off the outside with the retracting bridge, but leave the portculis up - presumably because you want to lure flying enemies inside, without letting walking ones in. (I dunno why, but it's good to have extra options.) You can just raise the drawbridge and form a wall (and yes, there's a reason there's a double wall there, it's so the drawbridge and the portcullis are both flush with walls when they're in place.)
About the moat - if you want to, you can use it as a method of regulated enemy interception. If you dig a path into the fort from it, door it off with forbidden doors, you can drop the enemies in there, then station your melee forces behind the door - open the door. Instant arena. Or you can just let them pathfind down a clear corridor full of cage traps for use in a more formal arena.
Or well, use your imagination.