You asked about d2pack which is a footprint but you mark the topic as Schematic. (The footprint is not only used for transistors.)
The d2pack is not the only name for this package. The name used in kicad is to-263
The D2PAK or DDPAK, standardized as TO-263 ...
This footprint is found in TO_SOT_Package_SMD
Generic transistor symbols are in device.lib
Make sure you choose the one matching your pinout. And assign the correct footprint to it either via cvpcb or via the symbol properties dialog. (set the footprint field accordingly. Either by use of the footprint browser or manually.)
Another option is to create an atomic symbol. (Symbol name = Manufacturer part number, footprint field filled out) Add this symbol to your personal lib. (If you are willing to share, you can add it to the official kicad lib via a pull request to the kicad-library repo)