J-PLUS: Discovery and characterisation of ultracool dwarfs using Virtual Observatory tools - II. Second data release and machine learning methodology