Lotta good recommendations here. If you get GrapheneOS, you could get any keyboard (including GBoard) and turn off its network access at the app level (as well as sensors and other permissions), which would make virtually any keyboard privacy-friendly.