You can "cancel" the only building in a queue if production hasn't actually started, i.e. in the same turn in which you selected it. Just select something else. But once a turn has passed and production has begun, all you can do is put something else at the head of the queue, when the "unwanted" job goes on hold - possibly for ever, if you keep on pushing it back. It'll never go away, though.