As noted in another answer QgsVectorLayer
is not and has never been part of the GDAL python bindings.
I think you want gdal.VectorTranslate()
.
At it's simplest, your code turns into:
from osgeo import gdal
fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance
gdal.VectorTranslate(outdb, fgdb)