There are several things that could account for the spokes being too long:
1) The hub flanges on the hub you had out back have a larger flange diameter (distance between centers of opposite spoke holes) than the old hub, resulting in a shorter distance from the hub spoke holes to the rim spoke holes.
2) You may have laced the wheel 2-cross instead of 3-cross,
3) The ERD of the old 27" rim may not be the same as the ERD of the replacement 27" rim.
There are critical dimensions you need to measure
on the hubs and rims in order to determine the correct spoke length for the lacing pattern you want to use. Once you have these dimensions you can plug them into
spocalc.