You can form a GRanges object from the vector of chromosome names and the vector of locations, same as you input to nearestTSS. The help page you link to gives an example of how to do that. I'm not familiar with get2NearestFeature though so can't help you with it.
Regarding nearestTSS, please be aware that it only works with hg38, not with hg19, so you should not use it at all in your analysis.
Is there a reason for using hg19, since hg38 was released nearly a decade ago?