You need to use a specific version of Fastlane.
You can find the version of Fastlane that is pre-installed on the stack by checking the system report for the stack you are using. If you need to use a different version, there are two ways to do this depending on if your project uses a Gemfile or not.
If your project uses a Gemfile
Define the required version number in your Gemfile. For example:
gem "fastlane", "2.166.0"
The Fastlane Step will install this version before running any lanes.
If your project doesn't use a Gemfile
Replace the pre-installed version by adding a Script Step to your Workflow with the following commands:
gem uninstall fastlane --all --executables
gem install fastlane --version 2.166.0 --no-document
Make sure that your Fastlane Step has the Should update fastlane gem before run? option set to false.