Should be a straight swap. Besides different porting, these cylinders should be identical. In Eric's book, he recommends the '99 cylinder & porting for many riders.
The '99 has more mild porting so look for increased bottom end power and a less abrupt hit. The stock '99 pipe is good and works well with the '99 cylinder, so you if your friend has his pipe, try to get it too. You may need to alter your jetting from what you were running on your '97.
It might also be a good idea to use the '99 head if he has that also. There might be a difference between the '97 and '99 heads that could change the compression ratio. I prefer the '99 because it hits hard right off the bottom. Unfortunately, it doesn't have much overrev, so it likes to be short-shifted.