The fifth generation iPad Pro 12.9” supports the second generation Apple Pencil. The first generation Apple Pencil is not supported by this model of iPad Pro. The much older first and second generation iPad Pro 12.9”, with a Lightning port, do support the first generation Apple Pencil.
Apple’s definitive compatibility list for Apple Pencil and iPad can be found here:
Apple Pencil compatibility - Apple Support
The first and second generation Pencil use an entirely different pairing and charging interface. The second generation Pencil can only be used with iPad models that have the magnetic/inductive dock that is exclusively designed for the Pencil. Charging is controlled via the iPad magnetic dock.
The first generation Apple Pencil uses the physical Lightning port for both pairing and charging the first generation Pencil. With the sole exception of the new iPad10 that requires a special adapter, the first generation Pencil can only be used with compatible iPad models that have a Lightning connector.
In summary, the Apple Pencil models are not interchangeable - and can only be used with the iPad that has appropriate internal hardware.