Pin compatibility between STM32L4X1 and STM32F1
STM32CubeMX (free registration required to download) can help you find MCUs that are pin-compatible with a particular MCU and pinout.

Start a project, select a MCU, configure the pins you intend to use, and press ALT+L for a listing. You may probably want to uncheck the Ingore... options there, and repeat the search.