You need to override the burn time of the corresponding BlockItem, like with this code to register a block that can be used as fuel:
private static <T extends Block> RegistryObject<Item> registerFuelBlockItem(String name, RegistryObject<T> block,
int burnTime) {
return ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties()) {
@Override
public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
return burnTime;
}
});
}