You can get the line number of an ASTNode using the below code
ASTNode node = compilationUnit.findDeclaringNode(field.getKey());
int lineNumber = compilationUnit.getLineNumber(node.getStartPosition()) - 1;
Note that this will work only if the bindings are resolved.
Refer the below links for more details: