what year did they stop making 340 motors??

Mopar Performance sold a 340 "replacement" block in the 80's and 90's. Basically these were 318 blocks with extra thick cylinder walls and deck surfaces. Some of these supposedly found their way into regular production 318 trucks, which I don't doubt. That being said, I wouldn't spend more than the value of a 318 core on a later block unless the block has been sonic checked, or otherwise documented.