ive never worked with a gb400/500, and no one else has chimed in so here is my speculation-
I doubt it will work, but if(and thisis a big if) the fork tubes are 35mm od like the 500, and if(another big if) the fork with is the same, and if, (a monster if) the distance of the centerline from the fork tubes to the center of the steering tube is the same, and if(astronomical if) the clamping id of the gb500 steer tube is thesame as the cb 500, And if,(you get where im going with this) the frames steering tube races are the same id, od, distance apart, yeah itll toatally work.
it might be alot easier to just swap the entire front end, check out threads for the gxr front end swaps. good luck and welcome to the forum!