ParameterType enumeration has been deprecated and replaced with the ForgeTypeId Class. Did a quick search and found some info here: https://thebuildingcoder.typepad.com/files/revit_platform_api_changes_and_additions_2022.pdf
If you intend to use this script in older versions as well as 2023, you might have to put a check for the revit version in your script to handle both cases.