Identifying my engine

My Valiant is a 65 4-Door which originally should have had a 225. But when I was installing points today I noticed the stampings behind the coil. It says B 170 04 27. I came up with a April 27th, 1966 170CID. Is that correct? So my Valiant no longer has the correct engine. Even the carburetor number was from a 1962 170CID. Does everything fit the same except for the internal parts?