Both forks would have 1 1/8 inch threadless steerers, so you should be able to make the swap as long as the steerer tube is long enough. If you take a fork from a small-framed bike and try to use it with a large frame, the fork's steerer tube may not reach all the way through the frame's head tube.