Take it apart and re-assemble on a flat surface - the floor will usually suffice - also making sure the diagonals are the same length, too. I know - not an option now!!
The wood will be accurately machined so planing to get it level will almost certainly leave another gap somewhere else - especially for someone inexperienced.
Unfortunately, by now, you have driven in all the nails and they will be very difficult to remove - another lesson, if you have fallen into that trap. Probably glued as well?
As Midland Beek says, any extra or removal will alter your bee space. It is much easier to make them level and sqare in the first place than effect remedial work afterwards.
I always screw them, the first screws straight in, for location, and then others 'on the tosh'. I never use the nails supplied. Knots are usually selected such that water ingress is avoided (direction of knot) and to be coverered, wherever possible. Any warping is pulled together with G clamps, or similar, before being screwed, again 'on the tosh'.
Regards, RAB