Is the gap visible and the same above the two leg-frames?
In addition to a twisted top, there are a few other causes possible:
– the floor not being flat (then the two leg-frames bearers might not be parallel);
– the two leg-frames not being identical (visible when placed against each other);
– The apron not being square to the top;
– the leg face not being square to the leg-frame bearer;
– the housing in the apron not being of consistent depth;
– the apron being cupped (convex on the inside face).
The easiest thing is to place the workbench where you intend to use it and put a shim in the gap. It should cure any of these problems.