You should put your Java fern near rocks, wood pieces, or decor in your aquarium. Using zip ties to attach them to stones or wood pieces is recommended. Remember to remove the zip ties once it has established itself on its new location.
With that said, the plant doesn’t mind floating around in the water, so you can simply place it inside your aquarium. Eventually, the fern will attach itself to its preferred location.
Just be careful not to let the fern’s rhizomes get covered with soil, gravel, or substrate. When its rhizomes are buried, the fern won’t be able to absorb any nutrients, causing it to stop growing and die slowly.