You can use Firefox Gekodriver to use morzila firefox as the preferred webdriver in selenium.
You can download the file form this link:-
https://github.com/mozilla/geckodriver/releases
You can use the following command to create an instance of your firefox driver.
System.setProperty("webdriver.firefox.marionette","C:\\Users\\Nabarupa\\geckodriver.exe");
// WebDriver driver = new FirefoxDriver();