To start with your system's firmware only offers the MicroCode for the CPU's Apple offered which are these [https://everymac.com/ultimate-mac-lookup/?search_keywords=iMac18,3|2017 27" iMac systems - iMac18,3] So make sure you got the correct CPU
I'm a bit confused on what you are asking as you can see in the listing I've posted the 3.4GHz i5 is a supported chip but did you get the correct series as thats the core issue you need the [link|https://ark.intel.com/content/www/us/en/ark/products/codename/82879/kaby-lake.html|Kaby Lake|new_window=true] series.