Yes, as a SET, they will fit, no problem, but make a label and put it on the rad support to denote 1997 heads
The reason is that you OR the next owner may want to order new parts, i.e. valves or valve guides and there was a change in STEM size in mid-1999
This doesn't effect the operation or compatibility, its just for replacement parts
You need a SET because there are Gas Only heads and Flex Fuel heads, you can run either on any 3.0l Vulcan engine, but as a SET, not one of each
2002 Ranger head gaskets and head bolts would be used, while the heads are the same the head bolts are longer in 1999 and up Ranger 3.0ls